Google Play Location Utils
object GooglePlayLocationUtils
Functions
Link copied to clipboard
Delete the cache of registered geofences. This will cause any geofences passed to .registerGeofencesWithGooglePlayIfNecessary on the next call to that method to be registered.
Link copied to clipboard
private fun registerGeofencesWithGeofencingClient(context: Context, newGeofencesToRegister: List<BrazeGeofence>, geofenceRequestIntent: PendingIntent, dataStoreProvider: GeofenceDataStoreProvider)
Registers a list of Geofence with a com.google.android.gms.location.GeofencingClient.
Link copied to clipboard
fun registerGeofencesWithGooglePlayIfNecessary(context: Context, desiredGeofencesToRegister: List<BrazeGeofence>, geofenceRequestIntent: PendingIntent, dataStoreProvider: GeofenceDataStoreProvider, removalFunction: (List<String>) -> Unit = {
removeGeofencesRegisteredWithGeofencingClient(context, it, dataStoreProvider)
}, registerFunction: (List<BrazeGeofence>) -> Unit = {
registerGeofencesWithGeofencingClient(context, it, geofenceRequestIntent, dataStoreProvider)
})
Requests to register the given list of geofences with Google Play Location Services.
Link copied to clipboard
private fun removeGeofencesFromLocalStorage(obsoleteGeofenceIds: List<String>, dataStoreProvider: GeofenceDataStoreProvider)
Removes the list of BrazeGeofence which are now un-registered with Google Play Services.
Link copied to clipboard
internal fun removeGeofencesRegisteredWithGeofencingClient(context: Context, obsoleteGeofenceIds: List<String>, dataStoreProvider: GeofenceDataStoreProvider)
Un-registers a list of Geofence with a com.google.android.gms.location.GeofencingClient.
Link copied to clipboard
fun requestSingleLocationUpdateFromGooglePlay(context: Context, resultListener: IBrazeGeofenceLocationUpdateListener)
Requests a single location update from Google Play Location Services for the given pending intent.
Link copied to clipboard
internal fun retrieveRegisteredGeofencesFromLocalStorage(dataStoreProvider: GeofenceDataStoreProvider): List<BrazeGeofence>
Link copied to clipboard
internal fun storeRegisteredGeofencesToLocalStorage(newGeofencesToRegister: List<BrazeGeofence>, dataStoreProvider: GeofenceDataStoreProvider)
Stores the list of BrazeGeofence which are successfully registered.