NavigationTransactionRecorder

public class NavigationTransactionRecorder extends Object

Contains methods for recording transactions. This class should only be used if your company is billed by Google on a per-transaction basis.

This class is thread-safe.

Nested Class Summary

@interface NavigationTransactionRecorder.AddressFailureType Types of address resolution failures  
class NavigationTransactionRecorder.AddressListener When pickup(Waypoint, List) or dropoff(Waypoint, List) are called the transaction recorder will lookup the phone's current location in the background and return it via this listener. 
class NavigationTransactionRecorder.TransactionException An exception thrown when trying to record a transaction with invalid input. 

Constant Summary

int FAILURE_LOOKUP_FAILURE
int FAILURE_NO_LOCATION
int FAILURE_NO_RIGHTS
int SUCCESS

Public Method Summary

void
dropoff(Waypoint waypoint, List<String> transactionIds)
Should be called each time a passenger or delivery is dropped off.
static String
generateTransactionId()
Utility method to generate a new unique transaction ID.
void
pickup(Waypoint waypoint, List<String> transactionIds)
Should be called each time a passenger or delivery is picked up.

Inherited Method Summary

Constants

public static final int FAILURE_LOOKUP_FAILURE

Constant Value: 2

public static final int FAILURE_NO_LOCATION

Constant Value: 1

public static final int FAILURE_NO_RIGHTS

Constant Value: 3

public static final int SUCCESS

Constant Value: 0

Public Methods

public void dropoff (Waypoint waypoint, List<String> transactionIds)

Should be called each time a passenger or delivery is dropped off. The transactionIds parameter should be populated with unique string identifiers for one or more transactions that apply to this event.

Each transaction ID must be at most 64 characters long, and there is a maximum of 100 transaction IDs per call.

This method should be called if and only if your company is billed by Google on a per-transaction basis.

Parameters
waypoint the navigation Waypoint at which the dropoff is occurring, or null if there was no navigation session leading to this dropoff
transactionIds one or more transaction IDs to which this dropoff applies. A transaction ID is an arbitrary string that is unique for each billable transaction.
Throws
NavigationTransactionRecorder.TransactionException if the list of transaction IDs is invalid

public static String generateTransactionId ()

Utility method to generate a new unique transaction ID.

public void pickup (Waypoint waypoint, List<String> transactionIds)

Should be called each time a passenger or delivery is picked up. The transactionIds parameter should be populated with unique string identifiers for one or more transactions that apply to this event.

Each transaction ID must be at least 1 and at most 64 characters long, and there is a maximum of 100 transaction IDs per call.

This method should be called if and only if your company is billed by Google on a per-transaction basis.

Parameters
waypoint the navigation Waypoint at which the pickup is occurring, or null if there was no navigation session leading to this pickup
transactionIds one or more transaction IDs to which this pickup applies. A transaction ID is an arbitrary string that is unique for each billable transaction.
Throws
NavigationTransactionRecorder.TransactionException if the list of transaction IDs is invalid.