sets up the location request . android has two location request settings : access_coarse_location and access_fine_location . these settings control the accuracy of the current location . this sample uses access_fine_location , as defined in the androidmanifest.xml . when the access_fine_location setting is specified , combined with a fast update interval 5 seconds , the fused location provider api returns location updates that are accurate to within a few feet . these settings are appropriate for mapping applications that show real-time location updates . concode_field_sep long UPDATE_INTERVAL_IN_MILLISECONDS concode_elem_sep Activity activity concode_elem_sep LocationSettingsRequest mLocationSettingsRequest concode_elem_sep int REQ_PERMISSIONS_REQUEST_ACCESS_FILE_LOCATION concode_elem_sep Context mContext concode_elem_sep boolean mRequestingLocationUpdates concode_elem_sep LatLng mCurrentLocation concode_elem_sep LocationRequest mLocationRequest concode_elem_sep int REQUEST_CHECK_SETTINGS concode_elem_sep GoogleApiClient mGoogleApiClient concode_elem_sep String TAG concode_elem_sep boolean isDialogShowing concode_elem_sep long FASTEST_UPDATE_INTERVAL_IN_MILLISECONDS concode_elem_sep String mLastUpdateTime concode_field_sep void stopLocationUpdates concode_elem_sep LatLng getLocation concode_elem_sep void buildGoogleApiClient concode_elem_sep boolean checkLocationPermission concode_elem_sep void locationRequestCancelled concode_elem_sep boolean isGPSOn concode_elem_sep GoogleApiClient getmGoogleApiClient concode_elem_sep void onConnectionFailed concode_elem_sep void checkLocationSettings concode_elem_sep void onConnected concode_elem_sep void onConnectionSuspended concode_elem_sep void onLocationChanged concode_elem_sep LocationUtil setActivity concode_elem_sep void startLocationUpdates concode_elem_sep boolean isLocationAvaliable concode_elem_sep boolean isValidLocation concode_elem_sep boolean isValidLocation concode_elem_sep boolean isValidLocation concode_elem_sep String getmLastUpdateTime concode_elem_sep boolean isDialogShowing concode_elem_sep void dialogClosed concode_elem_sep void buildLocationSettingsRequest concode_elem_sep void askLocationPermission concode_elem_sep boolean ismRequestingLocationUpdates concode_elem_sep void onResult
void function ( ) { mLocationRequest = new LocationRequest ( ) ; mLocationRequest . setInterval ( UPDATE_INTERVAL_IN_MILLISECONDS ) ; mLocationRequest . setFastestInterval ( FASTEST_UPDATE_INTERVAL_IN_MILLISECONDS ) ; mLocationRequest . setPriority ( LocationRequest . PRIORITY_HIGH_ACCURACY ) ; }