-
public class TrackingService.Companion
-
-
Field Summary
Fields Modifier and Type Field Description private final StringACTION_STARTprivate final StringACTION_STOPprivate final StringEXTRA_TARGETprivate final StringEXTRA_SESSIONprivate final StringEXTRA_SKIP_SESSION_STARTprivate final StringACTION_REGISTER_STOPSprivate final StringACTION_CLEAR_STOPSprivate final StringACTION_RESUME_SESSIONSprivate final StringACTION_GEOFENCE_ENTERprivate final StringACTION_GEOFENCE_EXITprivate final StringEXTRA_DELIVERY_IDSprivate final StringKEY_ROUTE_ACTIVEprivate final StringKEY_ROUTE_MANUAL_FOREGROUNDpublic final static TrackingService.CompanionINSTANCE
-
Method Summary
Modifier and Type Method Description final BooleanisRunning()final UnitstartRoute(Context context)Starts/(re-)asserts the route-owner foreground service so it registers geofences. final UnitresumeSessions(Context context)Re-asserts the service so it resumes persisted sessions (same recovery path as a START_STICKY null-intent restart). final UnitclearRoute(Context context)Tears down route geofencing + any active route sessions. final UnitsendGeofenceTransition(Context context, String action, Array<String> deliveryIds)Delivers a (best-effort) Play Services geofence transition to the service, which confirms it by distance. final StringgetACTION_START()final StringgetACTION_STOP()final StringgetEXTRA_TARGET()final StringgetEXTRA_SESSION()final StringgetEXTRA_SKIP_SESSION_START()final StringgetACTION_REGISTER_STOPS()final StringgetACTION_CLEAR_STOPS()final StringgetACTION_RESUME_SESSIONS()final StringgetACTION_GEOFENCE_ENTER()final StringgetACTION_GEOFENCE_EXIT()final StringgetEXTRA_DELIVERY_IDS()final StringgetKEY_ROUTE_ACTIVE()final StringgetKEY_ROUTE_MANUAL_FOREGROUND()-
-
Method Detail
-
startRoute
final Unit startRoute(Context context)
Starts/(re-)asserts the route-owner foreground service so it registers geofences.
-
resumeSessions
final Unit resumeSessions(Context context)
Re-asserts the service so it resumes persisted sessions (same recovery path as a START_STICKY null-intent restart). Used by SessionWatchdogWorker.
-
clearRoute
final Unit clearRoute(Context context)
Tears down route geofencing + any active route sessions.
-
sendGeofenceTransition
final Unit sendGeofenceTransition(Context context, String action, Array<String> deliveryIds)
Delivers a (best-effort) Play Services geofence transition to the service, which confirms it by distance. Uses startForegroundService so a geofence broadcast can wake a killed process and re-promote.
-
getACTION_START
final String getACTION_START()
-
getACTION_STOP
final String getACTION_STOP()
-
getEXTRA_TARGET
final String getEXTRA_TARGET()
-
getEXTRA_SESSION
final String getEXTRA_SESSION()
-
getEXTRA_SKIP_SESSION_START
final String getEXTRA_SKIP_SESSION_START()
-
getACTION_REGISTER_STOPS
final String getACTION_REGISTER_STOPS()
-
getACTION_CLEAR_STOPS
final String getACTION_CLEAR_STOPS()
-
getACTION_RESUME_SESSIONS
final String getACTION_RESUME_SESSIONS()
-
getACTION_GEOFENCE_ENTER
final String getACTION_GEOFENCE_ENTER()
-
getACTION_GEOFENCE_EXIT
final String getACTION_GEOFENCE_EXIT()
-
getEXTRA_DELIVERY_IDS
final String getEXTRA_DELIVERY_IDS()
-
getKEY_ROUTE_ACTIVE
final String getKEY_ROUTE_ACTIVE()
-
getKEY_ROUTE_MANUAL_FOREGROUND
final String getKEY_ROUTE_MANUAL_FOREGROUND()
-
-
-
-