HaylLtd / cordova-background-geolocation-plugin

Background and foreground geolocation plugin for Cordova.
Apache License 2.0
57 stars 66 forks source link

Start event not firing #109

Closed wimZ closed 1 year ago

wimZ commented 2 years ago

After calling bg.start the service is not starting. It all seems to have started after upgrading to Android 12. After reinstalling the plugin, it starts up OK.

I get the following logentries:

2022-08-12 16:13:49, INFO: Attempt to start bg service 2022-08-12 16:13:49, INFO: User granted requested permissions 2022-08-12 16:13:49, DEBUG: Service configured with: Config[distanceFilter=100 stationaryRadius=100.0 desiredAccuracy=0 interval=20000 fastestInterval=30000 activitiesInterval=10000 isDebugging=false stopOnTerminate=true stopOnStillActivity=true startOnBoot=false startForeground=true notificationsEnabled=true locationProvider=0 nTitle=GPS tracking nText=Actief nIconLarge= nIconSmall= nIconColor= url=https://bareza-hub.azurewebsites.net/loc syncUrl= syncThreshold=1 httpHeaders={} maxLocations=2 postTemplate={"lng":"@longitude","serial":"d9535dc5-58dc-410f-9de8-64c257518d5f","time":"@time","lat":"@latitude"}] 2022-08-12 16:13:49, DEBUG: Starting service

It is on Samsung A51 android 12 Cordova 11.0.0

I can't figure out why.

Any suggestions on how to further diagnose?

HarelM commented 2 years ago

Try debugging it using android studio?

wimZ commented 2 years ago

I've tried with Android Studio. (I'm a newbie with AS) After facade.start; callbackContext.success is called without failure. Yet no start event.

The problem seems build or install related. When I run debug after reinstalling the plugin, it may work, subsequent install+runs without altering any code may fail.

Are there known other plugins that may interfere?

HarelM commented 2 years ago

Cordova is a problem in terms of colliding plugin, every plugin is a potential problem :-( I'm not sure how to help here, sorry...

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn't be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it's important. Thank you for your contributions.