Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GeofencingEvent.fromIntent(Intent) returns null

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?

like image 411
DontDisplayMyName Avatar asked Feb 21 '26 18:02

DontDisplayMyName


1 Answers

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...

like image 175
DontDisplayMyName Avatar answered Feb 23 '26 07:02

DontDisplayMyName



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!