public class AWSLocationTracker
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.Long |
DEFAULT_EMIT_LOCATION_FREQUENCY |
static java.lang.Long |
DEFAULT_RETRIEVE_LOCATION_FREQUENCY |
Constructor and Description |
---|
AWSLocationTracker(java.lang.String trackerName,
AWSCredentialsProvider credentialsProvider)
Create a new tracker instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isTracking()
Returns true if this tracker instance is currently monitoring and sending the device's location.
|
void |
startTracking(android.content.Context context)
Start monitoring your device's location and sending the tracked coordinates to Amazon Location Service.
|
void |
startTracking(android.content.Context context,
TrackingListener listener)
Start monitoring your device's location and sending the tracked coordinates to Amazon Location Service.
|
void |
startTracking(android.content.Context context,
TrackingOptions options,
TrackingListener listener)
Start monitoring your device's location and sending the tracked coordinates to Amazon Location Service.
|
void |
stopTracking(android.content.Context context)
Stop recording and sending the device's location.
|
public static final java.lang.Long DEFAULT_RETRIEVE_LOCATION_FREQUENCY
public static final java.lang.Long DEFAULT_EMIT_LOCATION_FREQUENCY
public AWSLocationTracker(java.lang.String trackerName, AWSCredentialsProvider credentialsProvider)
trackerName
- The name of your tracker resource.credentialsProvider
- Your auth provider - most likely AWSMobileClient.getInstance()public void startTracking(android.content.Context context)
context
- Context for the application you are calling this frompublic void startTracking(android.content.Context context, TrackingListener listener)
context
- Context for the application you are calling this fromlistener
- Contains the various callback methods to listen to the different events which will be emitted.public void startTracking(android.content.Context context, TrackingOptions options, TrackingListener listener)
context
- Context for the application you are calling this fromoptions
- Configure details of how tracking will work.listener
- Contains the various callback methods to listen to the different events which will be emitted.public void stopTracking(android.content.Context context)
public boolean isTracking()
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.