state
Movement SDK Documentation
Overview
The Movement SDK provided by Foursquare enables developers to integrate location-based services into their Android applications. It allows you to manage user locations, track journeys, and respond to geofence events.
References
Key Classes
- FoursquareLocation: Represents a user's location.
- Journey: Manages the journey lifecycle.
- Geofence: Defines geographical boundaries.
Journey States
- PENDING: Journey has not yet started.
- IN_PROGRESS: Journey is currently active.
- COMPLETED: Journey has been finished.
- CANCELED: Journey has been aborted.
Geofence Event Types
- ENTRANCE: User enters the geofenced area.
- EXIT: User exits the geofenced area.
- DWELL: User stays within the geofence.
Important User State Components
- TRAVELING: Indicates if the user is currently traveling.
- COMMUTING: Reflects user's commuting status.
Notifications
The SDK provides notifications for geofence events and user state changes, allowing real-time updates to your application's UI and logic.
Example Usage
val journey = Journey()
journey.start() // Starts the journey
Conclusion
The Foursquare Movement SDK is a powerful tool for developers looking to enhance their applications with real-time location tracking and management. For more details, refer to the official documentation.