Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geofence not working while the app is closed on different Android OS' #15

Open
coosmiyn opened this issue Apr 17, 2019 · 6 comments
Open

Comments

@coosmiyn
Copy link

I am using this NuGet on Android 7, 8 and 9 and if I close the app the geofence doesn't work anymore. It works while the app is open or while in foreground but if I close it, nothing works anymore. I implemented everything needed (at least that's what I think), especially the GeofenceService and AppStarter in my Android project (I am using Forms) but still it doesn't work.

@coosmiyn
Copy link
Author

Update: Think everything works besides the CrossGeofenceListener which cannot be executing code while the app is closed. Tried making it a service in different ways, but still haven't got anywhere with it. Will be trying some more and update this if I get somewhere.

@nguyenthanhliemfc
Copy link

I have the same problem with you, Is it work when minimzize?

@coosmiyn
Copy link
Author

coosmiyn commented May 6, 2019

@nguyenthanhliemfc Yes, it does.
I took a deeper look in the plugin files and at least it should display a notification when I enter or exit a geofence with the app closed, if it doesn't execute the CrossGeofenceListener code, but it doesn't do a thing. I also tried with release version and still nothing. I am not sure what to try, I tried different things.

@carloscacua
Copy link

@coosmiyn @nguyenthanhliemfc Hey guys I was having the same issue and doublechecking I was missing some of this permission on manifest:
android.permission.ACCESS_FINE_LOCATION android.permission.ACCESS_COARSE_LOCATION com.google.android.providers.gsf.permission.READ_GSERVICES android.permission.RECEIVE_BOOT_COMPLETED. This permission allows the plugin to restore any geofence region previously monitored marked as persistent when rebooting.

@nguyenthanhliemfc
Copy link

I only see Write Gserveice not have Read Gservice???

@striboldt
Copy link
Contributor

Could it be related to GeofencePlugin is using an IntentService (which on Android O API level 28 and later) will apply background execution limits. Seems that the GeofencePlugin should be using a JobIntentService instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants