HaylLtd / cordova-background-geolocation-plugin

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

app close after BackgroundGeolocation.start() #119

Closed alextapia007 closed 1 year ago

alextapia007 commented 2 years ago

Describe the bug app close after BackgroundGeolocation.start()

To Reproduce Steps to reproduce the behavior: run BackgroundGeolocation.start();

Expected behavior start background geolocation

Desktop (please complete the following information):

Smartphone (please complete the following information):

HarelM commented 2 years ago

It sounds like the app crashes. I would recommend debugging this in android studio. Make sure you use the latest version of this plugin.

alextapia007 commented 2 years ago

ready, i did and: E/com.marianhello.logging.UncaughtExceptionLogger: FATAL EXCEPTION: mainjava.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/internal/zzbfm; at com.marianhello.bgloc.provider.LocationProviderFactory.getInstance(LocationProviderFactory.java:36) at com.marianhello.bgloc.service.LocationServiceImpl.start(LocationServiceImpl.java:357) at com.marianhello.bgloc.service.LocationServiceImpl.processCommand(LocationServiceImpl.java:306) at com.marianhello.bgloc.service.LocationServiceImpl.onStartCommand(LocationServiceImpl.java:288) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4808) at android.app.ActivityThread.access$2200(ActivityThread.java:275) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2206) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:210) at android.os.Looper.loop(Looper.java:299) at android.app.ActivityThread.main(ActivityThread.java:8280) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:576) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1073) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.internal.zzbfm"

HarelM commented 2 years ago

Looks similar to #84 probably a configuration issue or conflicting plugin.

alextapia007 commented 2 years ago

thanks. i'll see.

alextapia007 commented 2 years ago

Looks similar to #84 probably a configuration issue or conflicting plugin.

Thanks a lot, dont crash anymore, now i'll test 'location' event.

alextapia007 commented 2 years ago

Looks similar to #84 probably a configuration issue or conflicting plugin.

Do you know if there is a conflict with katzer/cordova-plugin-background-mode?

Because when I BackgroundGeolocation.start(); and then I put the BackgroundGeolocation.checkStatus(function(status) {}), the status.isRunning is still false

HarelM commented 2 years ago

I don't know, sorry.

alextapia007 commented 2 years ago

if im right, its android 12 issue...

lepokoloko commented 2 years ago

Describe the bug

APP CLOSE ON CHANGE PAGE IN APP.

LOG : ->

FATAL EXCEPTION: mainjava.lang.RuntimeException: Unable to start service com.marianhello.bgloc.service.LocationServiceImpl@2957475 with null: java.lang.IllegalArgumentException: io.uppermesh.tecnico: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5110) at android.app.ActivityThread.access$2100(ActivityThread.java:310) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2319) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) Caused by: java.lang.IllegalArgumentException: io.uppermesh.tecnico: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles. at android.app.PendingIntent.checkFlags(PendingIntent.java:382) at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673) at android.app.PendingIntent.getBroadcast(PendingIntent.java:660) at com.marianhello.bgloc.provider.ActivityRecognitionLocationProvider.onCreate(ActivityRecognitionLocationProvider.java:52) at com.marianhello.bgloc.service.LocationServiceImpl.start(LocationServiceImpl.java:359) at com.marianhello.bgloc.service.LocationServiceImpl.onStartCommand(LocationServiceImpl.java:274) at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5092) ... 9 common frames omitted 2022-10-06 02:11:39.149 1529-2302 ActivityManager pid-1529 W crash : io.uppermesh.tecnico,10473

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.