-
Notifications
You must be signed in to change notification settings - Fork 239
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
Update LocationUpdatesService.kt #217
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make for android 14
Thanks for the contribution! Was there a particular error you were getting that led you to believe this was due to android 14 related issues? |
@MoralCode The app crashes on Android 14 due to new requirements by Android. |
@Hamza-Ayed Even after applying you fix, the plugin still crashes on Android 14. Did you put any extra permission for it to work? |
I got the following exception on API34: Java TracebackE/AndroidRuntime( 4089): java.lang.RuntimeException: Unable to create service com.almoullim.background_location.LocationUpdatesService: java.lang.SecurityException: in.needoo.delivery: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
E/AndroidRuntime( 4089): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4664)
E/AndroidRuntime( 4089): at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
E/AndroidRuntime( 4089): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2264)
E/AndroidRuntime( 4089): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime( 4089): at android.os.Looper.loopOnce(Looper.java:205)
E/AndroidRuntime( 4089): at android.os.Looper.loop(Looper.java:294)
E/AndroidRuntime( 4089): at android.app.ActivityThread.main(ActivityThread.java:8177)
E/AndroidRuntime( 4089): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 4089): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
E/AndroidRuntime( 4089): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
E/AndroidRuntime( 4089): Caused by: java.lang.SecurityException: in.needoo.delivery: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
E/AndroidRuntime( 4089): at android.os.Parcel.createExceptionOrNull(Parcel.java:3057)
E/AndroidRuntime( 4089): at android.os.Parcel.createException(Parcel.java:3041)
E/AndroidRuntime( 4089): at android.os.Parcel.readException(Parcel.java:3024)
E/AndroidRuntime( 4089): at android.os.Parcel.readException(Parcel.java:2966)
E/AndroidRuntime( 4089): at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5684)
E/AndroidRuntime( 4089): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1852)
E/AndroidRuntime( 4089): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1792)
E/AndroidRuntime( 4089): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1780)
E/AndroidRuntime( 4089): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:755)
E/AndroidRuntime( 4089): at com.almoullim.background_location.LocationUpdatesService.onCreate(LocationUpdatesService.kt:154)
E/AndroidRuntime( 4089): at android.app.ActivityThread.handleCreateService(ActivityThread.java:4651)
E/AndroidRuntime( 4089): ... 9 more
E/AndroidRuntime( 4089): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime( 4089): at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:13927)
E/AndroidRuntime( 4089): at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2570)
E/AndroidRuntime( 4089): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2720)
E/AndroidRuntime( 4089): at android.os.Binder.execTransactInternal(Binder.java:1339)
E/AndroidRuntime( 4089): at android.os.Binder.execTransact(Binder.java:1275) When testing with the suggested changes in this PR, this error is no more. ✨ @ArbazSparkoSol I didn't have to make any other changes here, just this one line of change. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
No description provided.