Open pburgio opened 7 years ago
PS the issue disappears e.g., in my huawei + nougat device
Hi Paolo, Will you tell us how you solved the issue: Android project does not compile when using Geofence.Plugin with latest GooglePlayServices. I have the same issue unfortunately no solution to solve it.
Thank you for help, Placide.
Hello,
I simply surrounded with a try-catch this line of code -- GeofenbceBootReceiver::OnReceive (line 27):
var geofenceInstance= CrossGeofence.Current;
As said, in my huawai p10 w/nougtat, I don't experience the issue anymore..even without try-catch-ing that line
Ciao! Paolo
We addressed this by adding waits to the geofence handlers that only go through after the geofence plugin is initialized, we track initialization in our geofence handling class using a boolean that is set once OnAppInitialized is called.
We submitted a couple pull requests that address this and the authors of this package released a new plugin that incorporate them. Try https://www.nuget.org/packages/Plugin.Geofence/, it is almost a complete drop in replacement with the exception of a namespace change and can be used in projects targeting API 27.
When app is not active, you get a GeofenceNotInitializedException exception (see stack below all)
This is because at GeofenbceBootReceiver::OnReceive (line 27) there is
Ciao! Paolo