transistorsoft / cordova-background-geolocation-lt

The most sophisticated background location-tracking & geofencing module with battery-conscious motion-detection intelligence for iOS and Android.
http://www.transistorsoft.com/shop/products/cordova-background-geolocation
Other
656 stars 277 forks source link

The app is terminating in the background (Android). #1432

Closed toufiqpathan closed 2 months ago

toufiqpathan commented 3 months ago

Your Environment

Expected Behavior

Actual Behavior

Steps to Reproduce

1. 2. 3. 4.

Context

Debug logs

Logs ``` 2024-01-22 14:51:57.391 21761-21761 Compatibil...geReporter driverconnect.latitude247 D Compat change id reported: 171979766; UID 10219; state: ENABLED 2024-01-22 14:51:57.410 21761-21761 nativeloader driverconnect.latitude247 D Configuring classloader-namespace for other apk /system/framework/org.apache.http.legacy.jar. target_sdk_version=33, uses_libraries=ALL, library_path=/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/lib/x86_64:/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.apk!/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/driverconnect.latitude247 2024-01-22 14:51:57.412 21761-21761 ziparchive driverconnect.latitude247 W Unable to open '/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.dm': No such file or directory 2024-01-22 14:51:57.412 21761-21761 ziparchive driverconnect.latitude247 W Unable to open '/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.dm': No such file or directory 2024-01-22 14:51:57.769 21761-21761 nativeloader driverconnect.latitude247 D Configuring classloader-namespace for other apk /data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.apk. target_sdk_version=33, uses_libraries=, library_path=/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/lib/x86_64:/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.apk!/lib/x86_64, permitted_path=/data:/mnt/expand:/data/user/0/driverconnect.latitude247 2024-01-22 14:51:57.794 21761-21761 GraphicsEnvironment driverconnect.latitude247 V ANGLE Developer option for 'driverconnect.latitude247' set to: 'default' 2024-01-22 14:51:57.795 21761-21761 GraphicsEnvironment driverconnect.latitude247 V ANGLE GameManagerService for driverconnect.latitude247: false 2024-01-22 14:51:57.796 21761-21761 GraphicsEnvironment driverconnect.latitude247 V Neither updatable production driver nor prerelease driver is supported. 2024-01-22 14:51:57.803 21761-21761 NetworkSecurityConfig driverconnect.latitude247 D No Network Security Config specified, using platform default 2024-01-22 14:51:57.807 21761-21761 NetworkSecurityConfig driverconnect.latitude247 D No Network Security Config specified, using platform default 2024-01-22 14:51:57.881 21761-21761 Compatibil...geReporter driverconnect.latitude247 D Compat change id reported: 183155436; UID 10219; state: ENABLED 2024-01-22 14:51:57.883 21761-21761 FirebaseApp driverconnect.latitude247 I Device unlocked: initializing all Firebase APIs for app [DEFAULT] 2024-01-22 14:51:57.960 21761-21798 FirebaseAuth driverconnect.latitude247 I [FirebaseAuth:] Preparing to create service connection to fallback implementation 2024-01-22 14:51:57.981 21761-21808 ziparchive driverconnect.latitude247 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000002/DynamiteLoader.dm': No such file or directory 2024-01-22 14:51:57.981 21761-21808 ziparchive driverconnect.latitude247 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000002/DynamiteLoader.dm': No such file or directory 2024-01-22 14:51:57.991 21761-21808 DynamiteModule driverconnect.latitude247 I Considering local module com.google.android.gms.measurement.dynamite:51 and remote module com.google.android.gms.measurement.dynamite:87 2024-01-22 14:51:57.991 21761-21808 DynamiteModule driverconnect.latitude247 I Selected remote version of com.google.android.gms.measurement.dynamite, version >= 87 2024-01-22 14:51:57.991 21761-21808 DynamiteModule driverconnect.latitude247 V Dynamite loader version >= 2, using loadModule2NoCrashUtils 2024-01-22 14:51:58.041 21761-21808 ziparchive driverconnect.latitude247 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000007/MeasurementDynamite.dm': No such file or directory 2024-01-22 14:51:58.042 21761-21808 ziparchive driverconnect.latitude247 W Unable to open '/data/user_de/0/com.google.android.gms/app_chimera/m/00000007/MeasurementDynamite.dm': No such file or directory 2024-01-22 14:51:58.051 21761-21812 TransportR...oScheduler driverconnect.latitude247 D Upload for context TransportContext(cct, DEFAULT, MSRodHRwczovL2ZpcmViYXNlbG9nZ2luZy1wYS5nb29nbGVhcGlzLmNvbS92MS9maXJlbG9nL2xlZ2FjeS9iYXRjaGxvZ1xBSXphU3lDY2traUg4aTJaQVJ3T3MxTEV6RktsZDE1YU9HOG96S28=) is already scheduled. Returning... 2024-01-22 14:51:58.203 21761-21813 FA driverconnect.latitude247 V App measurement collection enabled 2024-01-22 14:51:58.206 21761-21813 FA driverconnect.latitude247 V App measurement enabled for app package, google app id: driverconnect.latitude247, 1:490224465825:android:9529c8b09cc3b244 2024-01-22 14:51:58.208 21761-21813 FA driverconnect.latitude247 I App measurement initialized, version: 75066 2024-01-22 14:51:58.209 21761-21813 FA driverconnect.latitude247 I To enable debug logging run: adb shell setprop log.tag.FA VERBOSE 2024-01-22 14:51:58.209 21761-21813 FA driverconnect.latitude247 I To enable faster debug mode event logging run: adb shell setprop debug.firebase.analytics.app driverconnect.latitude247 2024-01-22 14:51:58.210 21761-21813 FA driverconnect.latitude247 D Debug-level message logging enabled 2024-01-22 14:51:58.274 21761-21761 FirebaseCrashlytics driverconnect.latitude247 I Initializing Firebase Crashlytics 18.1.0 for driverconnect.latitude247 2024-01-22 14:51:58.396 21761-21825 libcrashlytics driverconnect.latitude247 D Initializing libcrashlytics version 3.0.0 2024-01-22 14:51:58.401 21761-21825 libcrashlytics driverconnect.latitude247 D Initializing native crash handling successful. 2024-01-22 14:51:58.447 21761-21761 ect.latitude247 driverconnect.latitude247 W Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (unsupported,core-platform-api, reflection, allowed) 2024-01-22 14:51:58.448 21761-21761 ect.latitude247 driverconnect.latitude247 W Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (unsupported,core-platform-api, reflection, allowed) 2024-01-22 14:51:58.448 21761-21761 ect.latitude247 driverconnect.latitude247 W Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (unsupported,core-platform-api, reflection, allowed) 2024-01-22 14:51:58.503 21761-21761 FirebaseInitProvider driverconnect.latitude247 I FirebaseApp initialization successful 2024-01-22 14:51:58.506 21761-21813 FA driverconnect.latitude247 D Resetting session stitching token to not null 2024-01-22 14:51:58.515 21761-21761 AGConnectProvider driverconnect.latitude247 I AGConnectInitializeProvider#onCreate 2024-01-22 14:51:58.516 21761-21761 AGConnectInstance driverconnect.latitude247 I AGConnectInstance#initialize 2024-01-22 14:51:58.525 21761-21761 ServiceRegistrarParser driverconnect.latitude247 I getServices 2024-01-22 14:51:58.527 21761-21761 ServiceRegistrarParser driverconnect.latitude247 I services:0 2024-01-22 14:51:58.531 21761-21813 FA driverconnect.latitude247 V Connecting to remote service 2024-01-22 14:51:58.537 21761-21761 AGC_Instance driverconnect.latitude247 I AGC SDK initialize end, default route:UNKNOWN 2024-01-22 14:51:58.550 21761-21813 FA driverconnect.latitude247 V Connection attempt already in progress 2024-01-22 14:51:58.556 21761-21813 FA driverconnect.latitude247 V Connection attempt already in progress 2024-01-22 14:51:58.619 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E resolveInfoList is null or empty 2024-01-22 14:51:58.621 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E PackagePriorityInfo list is null 2024-01-22 14:51:58.623 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E Failed to find HMS apk 2024-01-22 14:51:58.626 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 I Enter getHMSPackageNameForMultiService 2024-01-22 14:51:58.626 21761-21836 HMSSDK_HMS...ageManager driverconnect.latitude247 I enter asyncOnceCheckMDMState 2024-01-22 14:51:58.629 21761-21836 HMSSDK_HMS...ageManager driverconnect.latitude247 I quit asyncOnceCheckMDMState 2024-01-22 14:51:58.630 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E resolveInfoList is null or empty 2024-01-22 14:51:58.633 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E PackagePriorityInfo list is null 2024-01-22 14:51:58.636 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E Failed to find HMS apk 2024-01-22 14:51:58.638 21761-21761 HMSSDK_Hua...rvicesUtil driverconnect.latitude247 I hmsPackageName is com.huawei.hwid 2024-01-22 14:51:58.642 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E resolveInfoList is null or empty 2024-01-22 14:51:58.643 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E PackagePriorityInfo list is null 2024-01-22 14:51:58.645 21761-21761 HMSSDK_HMS...ageManager driverconnect.latitude247 E Failed to find HMS apk 2024-01-22 14:51:58.648 21761-21761 HMSSDK_Hua...rvicesUtil driverconnect.latitude247 I HMS is not installed 2024-01-22 14:51:58.731 21761-21761 Compatibil...geReporter driverconnect.latitude247 D Compat change id reported: 160794467; UID 10219; state: ENABLED 2024-01-22 14:51:58.741 21761-21840 HMSSDK_HMS...ageManager driverconnect.latitude247 I Enter getHMSPackageNameForMultiService 2024-01-22 14:51:58.742 21761-21840 HMSSDK_HMS...ageManager driverconnect.latitude247 E resolveInfoList is null or empty 2024-01-22 14:51:58.743 21761-21840 HMSSDK_HMS...ageManager driverconnect.latitude247 E PackagePriorityInfo list is null 2024-01-22 14:51:58.745 21761-21840 HMSSDK_HMS...ageManager driverconnect.latitude247 E Failed to find HMS apk 2024-01-22 14:51:58.747 21761-21840 HMSSDK_Hua...rvicesUtil driverconnect.latitude247 I hmsPackageName is com.huawei.hwid 2024-01-22 14:51:58.749 21761-21840 HMSSDK_HMS...ageManager driverconnect.latitude247 E resolveInfoList is null or empty 2024-01-22 14:51:58.751 21761-21840 HMSSDK_HMS...ageManager driverconnect.latitude247 E PackagePriorityInfo list is null 2024-01-22 14:51:58.753 21761-21840 HMSSDK_HMS...ageManager driverconnect.latitude247 E Failed to find HMS apk 2024-01-22 14:51:58.755 21761-21840 HMSSDK_Hua...rvicesUtil driverconnect.latitude247 I HMS is not installed 2024-01-22 14:51:58.770 21761-21838 ect.latitude247 driverconnect.latitude247 W Accessing hidden method Landroid/app/AppGlobals;->getInitialApplication()Landroid/app/Application; (unsupported, reflection, allowed) 2024-01-22 14:51:58.814 21761-21842 TSLocationManager driverconnect.latitude247 I [c.t.l.s.LocationRequestService handleLocationResult] ╔═════════════════════════════════════════════ ║ watchPosition LocationResult: 9 ╠═════════════════════════════════════════════ ╟─ 📍 Location[fused 37.421998,-122.084000 hAcc=5.018 et=+16d1h44m58s921ms alt=5.0 vAcc=0.42083332 vel=0.0 sAcc=0.5], age: 2803ms, time: 1705915316001 2024-01-22 14:51:58.814 21761-21838 TSLocationManager driverconnect.latitude247 D [c.t.l.logger.LoggerFacade$a a] PID: 1 2024-01-22 14:51:58.876 21761-21761 FIAM.Headless driverconnect.latitude247 I Starting InAppMessaging runtime with Installation ID cwhhyXlPQpilvDOX87Dr8M 2024-01-22 14:51:58.899 21761-21849 Settings driverconnect.latitude247 W Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value. 2024-01-22 14:51:58.921 21761-21840 Settings driverconnect.latitude247 W Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value. 2024-01-22 14:51:58.921 21761-21849 Settings driverconnect.latitude247 W Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value. 2024-01-22 14:51:58.925 21761-21840 Settings driverconnect.latitude247 W Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value. 2024-01-22 14:51:58.945 21761-21761 System.err driverconnect.latitude247 W java.lang.ClassNotFoundException: driverconnect.latitude247.BackgroundGeolocationHeadlessTask 2024-01-22 14:51:58.945 21761-21761 System.err driverconnect.latitude247 W at java.lang.Class.classForName(Native Method) 2024-01-22 14:51:58.945 21761-21761 System.err driverconnect.latitude247 W at java.lang.Class.forName(Class.java:454) 2024-01-22 14:51:58.945 21761-21761 System.err driverconnect.latitude247 W at java.lang.Class.forName(Class.java:379) 2024-01-22 14:51:58.946 21761-21761 System.err driverconnect.latitude247 W at com.transistorsoft.locationmanager.util.b.a(Unknown Source:43) 2024-01-22 14:51:58.946 21761-21761 System.err driverconnect.latitude247 W at com.transistorsoft.locationmanager.util.b.b(Unknown Source:15) 2024-01-22 14:51:58.947 21761-21761 System.err driverconnect.latitude247 W at com.transistorsoft.locationmanager.util.b.a(Unknown Source:43) 2024-01-22 14:51:58.956 21761-21761 System.err driverconnect.latitude247 W at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation._onLocationProviderChange(Unknown Source:25) 2024-01-22 14:51:58.957 21761-21761 System.err driverconnect.latitude247 W at java.lang.reflect.Method.invoke(Native Method) 2024-01-22 14:51:58.957 21761-21761 System.err driverconnect.latitude247 W at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:517) 2024-01-22 14:51:58.958 21761-21761 System.err driverconnect.latitude247 W at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:511) 2024-01-22 14:51:58.958 21761-21761 System.err driverconnect.latitude247 W at org.greenrobot.eventbus.HandlerPoster.handleMessage(HandlerPoster.java:67) 2024-01-22 14:51:58.959 21761-21761 System.err driverconnect.latitude247 W at android.os.Handler.dispatchMessage(Handler.java:106) 2024-01-22 14:51:58.959 21761-21761 System.err driverconnect.latitude247 W at android.os.Looper.loopOnce(Looper.java:201) 2024-01-22 14:51:58.981 21761-21761 System.err driverconnect.latitude247 W at android.os.Looper.loop(Looper.java:288) 2024-01-22 14:51:58.981 21761-21761 System.err driverconnect.latitude247 W at android.app.ActivityThread.main(ActivityThread.java:7872) 2024-01-22 14:51:58.981 21761-21761 System.err driverconnect.latitude247 W at java.lang.reflect.Method.invoke(Native Method) 2024-01-22 14:51:58.981 21761-21761 System.err driverconnect.latitude247 W at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 2024-01-22 14:51:58.982 21761-21761 System.err driverconnect.latitude247 W at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 2024-01-22 14:51:58.988 21761-21761 System.err driverconnect.latitude247 W Caused by: java.lang.ClassNotFoundException: Didn't find class "driverconnect.latitude247.BackgroundGeolocationHeadlessTask" on path: DexPathList[[zip file "/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.apk"],nativeLibraryDirectories=[/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/lib/x86_64, /data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.apk!/lib/x86_64, /system/lib64, /system_ext/lib64]] 2024-01-22 14:51:58.989 21761-21761 System.err driverconnect.latitude247 W at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) 2024-01-22 14:51:58.989 21761-21761 System.err driverconnect.latitude247 W at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 2024-01-22 14:51:58.989 21761-21761 System.err driverconnect.latitude247 W at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 2024-01-22 14:51:58.989 21761-21761 System.err driverconnect.latitude247 W ... 18 more 2024-01-22 14:51:58.993 21761-21813 FA driverconnect.latitude247 D Connected to remote service 2024-01-22 14:51:58.995 21761-21813 FA driverconnect.latitude247 V Processing queued up service tasks: 3 2024-01-22 14:51:59.122 21761-21761 System.err driverconnect.latitude247 W java.lang.ClassNotFoundException: driverconnect.latitude247.BackgroundGeolocationHeadlessTask 2024-01-22 14:51:59.125 21761-21761 System.err driverconnect.latitude247 W at java.lang.Class.classForName(Native Method) 2024-01-22 14:51:59.125 21761-21761 System.err driverconnect.latitude247 W at java.lang.Class.forName(Class.java:454) 2024-01-22 14:51:59.125 21761-21761 System.err driverconnect.latitude247 W at java.lang.Class.forName(Class.java:379) 2024-01-22 14:51:59.126 21761-21761 System.err driverconnect.latitude247 W at com.transistorsoft.locationmanager.util.b.a(Unknown Source:43) 2024-01-22 14:51:59.126 21761-21761 System.err driverconnect.latitude247 W at com.transistorsoft.locationmanager.util.b.b(Unknown Source:15) 2024-01-22 14:51:59.128 21761-21761 System.err driverconnect.latitude247 W at com.transistorsoft.locationmanager.util.b.a(Unknown Source:43) 2024-01-22 14:51:59.128 21761-21761 System.err driverconnect.latitude247 W at com.transistorsoft.locationmanager.adapter.BackgroundGeolocation.onConnectivityChange(Unknown Source:32) 2024-01-22 14:51:59.128 21761-21761 System.err driverconnect.latitude247 W at java.lang.reflect.Method.invoke(Native Method) 2024-01-22 14:51:59.129 21761-21761 System.err driverconnect.latitude247 W at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:517) 2024-01-22 14:51:59.130 21761-21761 System.err driverconnect.latitude247 W at org.greenrobot.eventbus.EventBus.invokeSubscriber(EventBus.java:511) 2024-01-22 14:51:59.131 21761-21761 System.err driverconnect.latitude247 W at org.greenrobot.eventbus.HandlerPoster.handleMessage(HandlerPoster.java:67) 2024-01-22 14:51:59.131 21761-21761 System.err driverconnect.latitude247 W at android.os.Handler.dispatchMessage(Handler.java:106) 2024-01-22 14:51:59.132 21761-21761 System.err driverconnect.latitude247 W at android.os.Looper.loopOnce(Looper.java:201) 2024-01-22 14:51:59.134 21761-21761 System.err driverconnect.latitude247 W at android.os.Looper.loop(Looper.java:288) 2024-01-22 14:51:59.135 21761-21761 System.err driverconnect.latitude247 W at android.app.ActivityThread.main(ActivityThread.java:7872) 2024-01-22 14:51:59.142 21761-21761 System.err driverconnect.latitude247 W at java.lang.reflect.Method.invoke(Native Method) 2024-01-22 14:51:59.143 21761-21761 System.err driverconnect.latitude247 W at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 2024-01-22 14:51:59.149 21761-21761 System.err driverconnect.latitude247 W at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 2024-01-22 14:51:59.150 21761-21761 System.err driverconnect.latitude247 W Caused by: java.lang.ClassNotFoundException: Didn't find class "driverconnect.latitude247.BackgroundGeolocationHeadlessTask" on path: DexPathList[[zip file "/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.apk"],nativeLibraryDirectories=[/data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/lib/x86_64, /data/app/~~u4vgj-IhtgxANhtVL6WeGw==/driverconnect.latitude247-M38fXJ_f16JPUpHWwASv3A==/base.apk!/lib/x86_64, /system/lib64, /system_ext/lib64]] 2024-01-22 14:51:59.151 21761-21761 System.err driverconnect.latitude247 W at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) 2024-01-22 14:51:59.152 21761-21761 System.err driverconnect.latitude247 W at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 2024-01-22 14:51:59.152 21761-21761 System.err driverconnect.latitude247 W at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 2024-01-22 14:51:59.155 21761-21761 System.err driverconnect.latitude247 W ... 18 more 2024-01-22 14:52:04.069 21761-21813 FA driverconnect.latitude247 V Inactivity, disconnecting from the service ```
toufiqpathan commented 3 months ago

Hi @christocracy,UAE customers are facing this issue. Is the plugin not working for any specific zone? Please help me with this ASAP.

christocracy commented 3 months ago

java.lang.ClassNotFoundException: driverconnect.latitude247.BackgroundGeolocationHeadlessTask

Your problem has nothing to do with geography. You failed to properly configure your headless-task class.

See api docs Config.enableHeadless.

toufiqpathan commented 3 months ago

HI @christocracy ,

Thanks for your response, i have add the enableHeadless as true in ready function, still activity is getting kill, here is adb logcat logs.txt

christocracy commented 3 months ago

There's far more to enabling headless mode than enableHeadless: true.

You have to create a custom Java class. It is a very advanced feature requiring careful attention to following the Setup Instructions, as detailed in the api docs.

toufiqpathan commented 3 months ago

yeah i have created the java class file Class

christocracy commented 3 months ago

That's your BackgroundFetch headless task.

What about the BackgroundGeolocation headless task?

toufiqpathan commented 3 months ago

shall i create BackgroundGeolocation headless task in the same folder?

christocracy commented 3 months ago

Just follow the api docs Config.headlessTask for each plugin."

toufiqpathan commented 3 months ago

Followed the api doc for headlessTask, still getting the error attached the logs logs.txt

christocracy commented 3 months ago

System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "driverconnect.latitude247.BackgroundGeolocationHeadlessTask"

toufiqpathan commented 3 months ago

In BackgroundGeolocationHeadlessTask class file, do we need to update the package name?

christocracy commented 3 months ago

What do the Setup Instructions tell you to do?

christocracy commented 3 months ago

image

toufiqpathan commented 3 months ago

i am not getting any error, but still activity is getting closed logs.txt [Uploading logs.txt…]()

christocracy commented 3 months ago

I don't see any problems coming from the plug-in. See wiki "Debugging" and learn to use verbose logging

toufiqpathan commented 3 months ago

Hi @christocracy , here is the verbose logs, when i put application in the background. logs.txt

christocracy commented 3 months ago

I suggest you comment-out all plug-in code except for the call to .ready(config).

Those don't look anything like the plug-in's verbose logs. The plug-in's verbose logs are very colorful with heavy use of emojis.

christocracy commented 3 months ago

See api docs Config.logLevel.

READ the wiki "Debugging"

toufiqpathan commented 3 months ago

here is the verbose loglevel with 5 logs.txt

christocracy commented 3 months ago

I told you to disable everything but .ready. Your .watchPosition code is still running!

Also, what are you doing in your headless task?

toufiqpathan commented 3 months ago

I have commented out the other parts of the code except for '.ready,' and in the headless task, I have implemented exactly what is documented in the API, without adding any additional code to the 'headlesstask.java' file. HeadlessTasktxt.txt logs.txt

christocracy commented 3 months ago

I see no issue with the plug-in. It is not responsible for you app being terminated. There is no exception raised and the plug-in headless-task happily runs.

I suggest you create yourself a simple hello-world app and experiment using the plug-in in isolation.