public class GoogleLocationClient extends BaseGoogleLocationClient implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener
GoogleApiClient-based Google Play Services Location API.CAUSE_NETWORK_LOST, CAUSE_SERVICE_DISCONNECTED| Constructor and Description |
|---|
GoogleLocationClient()
Initialises a newly created
GoogleLocationClient object. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
buildClient(Activity activity)
Please refer to the base method description.
|
protected void |
clearResolvingError()
Clears resolving error.
|
protected void |
connect()
Connects the client.
|
GoogleApiClient |
getClient()
Returns the Google Play Services Location API client.
|
protected void |
getFromBundle(Bundle savedInstanceState)
Please refer to the base method description.
|
boolean |
onActivityResult(Activity activity,
akha.yakhont.Core.RequestCodes requestCode,
int resultCode,
Intent data)
Please refer to the base method description.
|
void |
onConnected(Bundle connectionHint)
Please refer to the base method description.
|
void |
onConnectionFailed(ConnectionResult result)
Please refer to the base method description.
|
void |
onConnectionSuspended(int cause)
Please refer to the base method description.
|
void |
onCreate(Activity activity,
Bundle savedInstanceState)
Please refer to the base method description.
|
void |
onPause(Activity activity)
Please refer to the base method description.
|
void |
onResume(Activity activity)
Please refer to the base method description.
|
void |
onSaveInstanceState(Activity activity,
Bundle savedInstanceState)
Please refer to the base method description.
|
void |
onStart(Activity activity)
Please refer to the base method description.
|
void |
onStop(Activity activity)
Please refer to the base method description.
|
protected void |
requestLocationUpdates(Activity activity,
LocationRequest locationRequest)
Please refer to the base method description.
|
LocationCallbacks.LocationClient |
showSystemErrorDialog(boolean systemErrorDialog)
Sets the "show system error dialog" flag.
|
protected void |
stopLocationUpdates(Activity activity)
Please refer to the base method description.
|
createNewLocationRequest, getCurrentLocation, getLastUpdateTime, onDestroy, onLocationChanged, setLocation, setLocationCallbacks, setLocationUpdatesParameters, setLocationUpdatesParameters, setLocationUpdatesParameters, setUniqueUpdates, startLocationUpdatespublic GoogleLocationClient()
GoogleLocationClient object.public GoogleApiClient getClient()
GoogleApiClientpublic LocationCallbacks.LocationClient showSystemErrorDialog(boolean systemErrorDialog)
true.systemErrorDialog - true to display system error dialog, false otherwiseLocationClient objectprotected void clearResolvingError()
protected void connect()
public void onSaveInstanceState(Activity activity, Bundle savedInstanceState)
onSaveInstanceState in interface LocationCallbacks.LocationClientonSaveInstanceState in class BaseGoogleLocationClientactivity - The ActivitysavedInstanceState - The last saved instance state of the Activity, or nullprotected void getFromBundle(Bundle savedInstanceState)
getFromBundle in class BaseGoogleLocationClientsavedInstanceState - The activity state saved in the Bundlepublic void onCreate(Activity activity, Bundle savedInstanceState)
onCreate in interface LocationCallbacks.LocationClientonCreate in class BaseGoogleLocationClientactivity - The ActivitysavedInstanceState - The last saved instance state of the Activity, or nullpublic void onStart(Activity activity)
onStart in interface LocationCallbacks.LocationClientonStart in class BaseGoogleLocationClientactivity - The Activitypublic void onResume(Activity activity)
onResume in interface LocationCallbacks.LocationClientonResume in class BaseGoogleLocationClientactivity - The Activitypublic void onPause(Activity activity)
onPause in interface LocationCallbacks.LocationClientonPause in class BaseGoogleLocationClientactivity - The Activitypublic void onStop(Activity activity)
onStop in interface LocationCallbacks.LocationClientonStop in class BaseGoogleLocationClientactivity - The Activityprotected void requestLocationUpdates(@NonNull Activity activity, @NonNull LocationRequest locationRequest)
requestLocationUpdates in class BaseGoogleLocationClientactivity - The activitylocationRequest - The LocationRequestprotected void stopLocationUpdates(Activity activity)
stopLocationUpdates in class BaseGoogleLocationClientactivity - The activityprotected void buildClient(@NonNull Activity activity)
buildClient in class BaseGoogleLocationClientactivity - The activitypublic void onConnected(Bundle connectionHint)
onConnected in interface GoogleApiClient.ConnectionCallbackspublic void onConnectionSuspended(int cause)
onConnectionSuspended in interface GoogleApiClient.ConnectionCallbackspublic void onConnectionFailed(@NonNull ConnectionResult result)
onConnectionFailed in interface GoogleApiClient.OnConnectionFailedListenerpublic boolean onActivityResult(Activity activity, akha.yakhont.Core.RequestCodes requestCode, int resultCode, Intent data)
onActivityResult in interface LocationCallbacks.LocationClientactivity - The ActivityrequestCode - The request code originally supplied to Activity.startActivityForResult(Intent, int),
allowing you to identify who this result came fromresultCode - The integer result code returned by the child activity through its Activity.setResult(int)data - The Intent, which can return result data to the callertrue if requestCode was handled, false otherwise
Copyright © 2015-2017 akha, a.k.a. Alexander Kharitonov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.