I setup a geofence which gets triggered as expected, when the device exits the radius. However the geofencing event is completely empty.
override fun onReceive(context: Context, intent: Intent) {
val geofencingEvent = GeofencingEvent.fromIntent(intent)
}
- geofencingEvent.geofenceTransition is -1
- geofencingEvent.triggeringGeofences is null
- geofencingEvent.triggeringLocation is null
- geofencingEvent.hasError() is false
Which is not very surprising, since the intent is empty as well. But where does e geofence-trigger intent usually get its data from to help GeofencingEvent.fromIntent() to build the event? What could go wrong, that the intent is empty? (no action, no extras... the intent uri looks like this :
intent:#Intent;launchFlags=0x10;component=de.yukiarts.test/.GeofenceBroadcastReceiver;end
I found this question from 7 years ago, which describes the same behavior without an answer. I followed this documentation pretty accuratley. Any ideas what I could be doing wrong?