public class TrackingPublisher
extends java.lang.Object
Constructor and Description |
---|
TrackingPublisher(AmazonLocationClient locationClient,
java.lang.String deviceId,
java.lang.String trackerName) |
TrackingPublisher(AmazonLocationClient locationClient,
java.lang.String deviceId,
java.lang.String trackerName,
int workerPoolSize,
long publishIntervalMillis,
int batchSize,
TrackingListener listener) |
TrackingPublisher(AmazonLocationClient locationClient,
java.lang.String deviceId,
java.lang.String trackerName,
java.util.concurrent.ScheduledExecutorService scheduledExecutorService,
long publishIntervalMillis,
int batchSize,
TrackingListener listener) |
Modifier and Type | Method and Description |
---|---|
void |
enqueue(android.location.Location location)
Adds a location to the location queue.
|
void |
forceFlush()
Force pending locations in the location queue to be batched and
sent to the location service.
|
int |
pendingBatches()
Checks the number of batches waiting to be sent to the location service.
|
int |
pendingPositionUpdates()
Checks the number of position updates waiting to be batched.
|
void |
shutdown()
Stops the publisher from publishing.
|
public TrackingPublisher(AmazonLocationClient locationClient, java.lang.String deviceId, java.lang.String trackerName)
public TrackingPublisher(AmazonLocationClient locationClient, java.lang.String deviceId, java.lang.String trackerName, int workerPoolSize, long publishIntervalMillis, int batchSize, TrackingListener listener)
public TrackingPublisher(AmazonLocationClient locationClient, java.lang.String deviceId, java.lang.String trackerName, java.util.concurrent.ScheduledExecutorService scheduledExecutorService, long publishIntervalMillis, int batchSize, TrackingListener listener)
public void enqueue(android.location.Location location)
location
- - Location reported by the Android OS.public void shutdown()
public int pendingPositionUpdates()
public int pendingBatches()
public void forceFlush()
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.