-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
App crashing on android 14 #241
Comments
Facing the same issue |
Can you tell me how we can get the crash report |
@divyaAtDelta The issue is related to prerequisite permissions required to start the foreground service. In your case, you have used |
I have got this from firebase console, as crashlytics is integrated in my project. |
what permission you were missing previously, and now by adding that permission has fixed your issue, because in my case, the mentioned permission are already there in my manifest file. |
Permission in manifest is required and you need to grant the location permission to the app before starting the background action. |
I try one solution and works well for now on AndroidManifest.xml, add service for the backgroun service:
on android/build.gradlew, update to sdk 34:
|
Any update still same issue! |
I am performing background task to send users location to server after every 3 min. At the starting of the application i am asking for background location permission and while starting background service I am checking whether the permission has been given already or not?. If its given then only I am starting the background service. But, while starting permission was granted, but, now user put my application in the background and through settings app revoking the location permission. In this scenario application is crashing on android 14. But, on android 12 its working totally fine. Here I am sharing the crash report below,
Fatal Exception: java.lang.RuntimeException: Unable to start service com.asterinet.react.bgactions.RNBackgroundActionsTask@59c59be with Intent { cmp=com.delta.the.runner/com.asterinet.react.bgactions.RNBackgroundActionsTask (has extras) mCallingUid=10544 }: java.lang.SecurityException: Starting FGS with type location callerApp=ProcessRecord{a224dfd 27293:com.delta.the.runner/u0a544} targetSDK=34 requires permissions: all of the permissions allOf=true [android.permission.FOREGROUND_SERVICE_LOCATION] any of the permissions allOf=false [android.permission.ACCESS_COARSE_LOCATION, android.permission.ACCESS_FINE_LOCATION] and the app must be in the eligible state/exemptions to access the foreground only permission
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5134)
at android.app.ActivityThread.-$$Nest$mhandleServiceArgs()
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2481)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:257)
at android.os.Looper.loop(Looper.java:368)
at android.app.ActivityThread.main(ActivityThread.java:8839)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
Any help regarding this issue is highly appreciated.
The text was updated successfully, but these errors were encountered: