Movement Sdk
The main entry point for starting the Movement SDK
Types
Functions
Cancel the current journey, stop all journey updates and set currentJourney to null. If successful, this method will cause a final journey update with a status of "cancelled."
Checkin at the current journey's destination, stop all journey updates and set currentJourney to null. If successful, this method will cause a final journey update with a status of "completed."
Complete the current journey, stop all journey updates and set currentJourney to null. If successful, this method will cause a final journey update with a status of "completed."
Disables the foreground notification configuration. Useful for when your user opts out of the notification at runtime. You should also save state so you don't initialize it again the next time android.app.Application.onCreate runs.
Allow the Movement SDK to use a Foreground service on Android O+ while your user is moving to increase location resolution and timeliness of notifications that you receive. This is required to be called in android.app.Application.onCreate.
Access data about a currently running journey. This method will return null when there is not current journey running.
Get the current location of the user and any potential geofences they are located in
Gives you the currently active visit.
For improved debugging and the enabling of the logs page in the SdkDebugActivity of the movementsdk-debugging module, turn on persistent logs.
For improved debugging, by allowing of all events on Debug builds to log to the developer console
For improved live debugging and the enabling of the logs page in the SdkDebugActivity of the movementsdk-debugging module, turn on persistent logs.
The SDK will suppress exceptions caused when your application throws them in any of the visit notification callbacks so that its running state is not compromised. Because you may still like to be made aware of these, add a ExceptionHandler to be alerted of their existence.
Sets the LogLevel that the SDK will use when sending its logs to logcat and the persistent log storage.
Sets the notification handler that all of your visit notifications will be sent to.
If your application authenticates its users with Foursquare you can pass the oauth token here for use by the Movement SDK. Using an authenticated user allows the Movement SDK to give more personalized results that may result in better accuracy.
Set arbitrary data that will be passed to your servers on visit notifications.
Begin a journey to a Foursquare venue or geofence by passing the Foursquare venue id as well any metadata you'd like to accompany the start request. Once a journey has been started you will automatically receive updates via the NotificationHandler.handleJourneyUpdate delegate method. Updates will occur roughly once per minute while the journey is active.