Geofence Monitoring in Background on Android 8

Hi,

I was wondering if anyone knew of - or had actually made - a plugin or maybe a patch for the ‘cordova-plugin-geofence’ plugin (@ionic-native/geofence) to allow it to work on Android 8 when it is in the background?

The new requirement for Google Play Store means that you have to build your apps using at least API 26 (Android 8) and the background restrictions enforced by this mean that the cordova-plugin-geofence plugin ceases to work on devices running Android 8+ once your app is in the background due to the very limited location updates.

I understand from the Android docs that the solution is to start a foreground service somehow with an ongoing notification, but that’s as much as I understand. Sadly my Android skills are woefully lacking and I’m not able to solve this myself, so thought I’d ask if anyone else had solved this at all …