Skip to content

Commit

Permalink
Attempt to workaround geofencing error
Browse files Browse the repository at this point in the history
  • Loading branch information
shai-almog authored May 20, 2024
1 parent f76b61c commit 8cc3783
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ public void onReceive(Context context, Intent intent) {
}
if (ACTION_PROCESS_GEOFENCE_TRANSITIONS.equals(action)) {
GeofencingEvent geofencingEvent = GeofencingEvent.fromIntent(intent);
if(geofencingEvent == null) {
// Attempt to workaround this issue: https://stackoverflow.com/questions/78497339/geofence-bug-in-codename-one-on-android
Log.e(TAG, "Null geofencingEvent!");
return;
}

if (geofencingEvent.hasError()) {
String errorMessage = GeofenceStatusCodes
.getStatusCodeString(geofencingEvent.getErrorCode());
Expand Down

0 comments on commit 8cc3783

Please sign in to comment.