monodroid-samples
monodroid-samples copied to clipboard
No use of mGeofencePendingIntent in google-services / Location /geofencing example?
Please correct me if I'm wrong, but as far as I can tell there is no use of the var mGeofencePendingIntent in the MainActivity.cs
It is being created, set to null in OnCreated (while it is null) and there's a check in GetGeoforcePendingIntent:
if (mGeofencePendingIntent != null) { return mGeofencePendingIntent; }
It is not set anywhere. I assume it should be set with the value of the PendingIntent.GetService which is returned in the GetGeofencePendingIntent.
Related sample: https://github.com/xamarin/monodroid-samples/tree/master/google-services/Location/Geofencing
Similar case with google sample: https://github.com/googlesamples/android-play-location/blob/master/Geofencing/app/src/main/java/com/google/android/gms/location/sample/geofencing/MainActivity.java#L230
I think it left when this sample was deprecated here: https://github.com/googlesamples/android-Geofencing/blob/master/Application/src/main/java/com/example/android/wearable/geofencing/MainActivity.java#L153
Anyways, this could be assigned when PendingIntent is generated instead of return it every time (as you assumed). We'll keep it in mind in future updates.
Thanks