I followed this tutorial using Java. As expected the BroadcastReceiver receives an Intent, but the GeofencingEvent fromIntent (Intent intent) method returns NULL.
According to the docs for fromIntent:
returns - a GeofencingEvent object or null if the given intent is null or doesn't contain geofencing event
What are possible reasons?
While i wrote this question i noticed the error:
In newer versions PendingIntent.getBroadcast forces you to choose either PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UNMUTABLE. I chose FLAG_UNMUTABLE...
Obviously the Intent cant get filled with GeofenceEvent Information if its not mutable...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With