-
Notifications
You must be signed in to change notification settings - Fork 185
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
i have a driving app that use flutter_mapbox_navigation as a navigation map but my app crash when the mapbox navigation is called Android 13 and android 14 version #358
Comments
Same issue, downgrading the compileSdkVersion to 33 solves the issue. |
This is still not working despite changing the SDK version. |
Hello Guys, android/src/main/kotlin/com/eopeter/fluttermapboxnavigation/activity/NavigationActivity.kt In this file you need to add the below codes for registerReceiver. In the import section:
at registerReceiver replace this registerReceiver code:
I hope it is works for you. |
When is this fix going to be included in master branch?
|
Hi everyone, it worked, thanks for the support |
This is the key, i had a lot of problems while cancel/finish the navigation, but modifying the package with this all works like a clock! I don't know why this does not merge into the main branch.
|
I'm also getting the "One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts" on startNavigation since I upgraded compileSdkVersion from 33 to 34. It is a Google Play requirement to target at least API 34 (Android 14), so downgrading back to 33 it's not an option. I'm also not able to make these changes. The file NavigationActivity.kt doesn't exist in my project. How can I fix this?
|
@ffkarine If you are using Windows go to %localappdata%\pub\Cache\hosted\pub.dev\flutter_mapbox_navigation-0.2.2, here is where you can find 'android/src/main/kotlin/com/eopeter/fluttermapboxnavigation/activity/NavigationActivity.kt' and remember trying to not execute pub get and make a backup of the library locally |
Thank you so much for explaining it to me @ivan-acosta08 and thank you @jayu146 for the solution too! |
FATAL EXCEPTION: main
E/AndroidRuntime(25984): Process: com.example.driverapp, PID: 25984
E/AndroidRuntime(25984): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.driverapp/com.eopeter.fluttermapboxnavigation.activity.NavigationActivity}: java.lang.SecurityException: com.example.driverapp: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
E/AndroidRuntime(25984): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4164)
E/AndroidRuntime(25984): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
E/AndroidRuntime(25984): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
E/AndroidRuntime(25984): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
E/AndroidRuntime(25984): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
E/AndroidRuntime(25984): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2685)
E/AndroidRuntime(25984): at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(25984): at android.os.Looper.loopOnce(Looper.java:230)
E/AndroidRuntime(25984): at android.os.Looper.loop(Looper.java:319)
E/AndroidRuntime(25984): at android.app.ActivityThread.main(ActivityThread.java:8893)
E/AndroidRuntime(25984): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(25984): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
E/AndroidRuntime(25984): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
E/AndroidRuntime(25984): Caused by: java.lang.SecurityException: com.example.driverapp: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
E/AndroidRuntime(25984): at android.os.Parcel.createExceptionOrNull(Parcel.java:3069)
E/AndroidRuntime(25984): at android.os.Parcel.createException(Parcel.java:3053)
E/AndroidRuntime(25984): at android.os.Parcel.readException(Parcel.java:3036)
E/AndroidRuntime(25984): at android.os.Parcel.readException(Parcel.java:2978)
E/AndroidRuntime(25984): at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:6137)
E/AndroidRuntime(25984): at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:6137)
E/AndroidRuntime(25984): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(25984): at leakcanary.ServiceWatcher$install$4$2.invoke(ServiceWatcher.kt:93)
E/AndroidRuntime(25984): at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
E/AndroidRuntime(25984): at $Proxy3.registerReceiverWithFeature(Unknown Source)
E/AndroidRuntime(25984): at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1913)
E/AndroidRuntime(25984): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1853)
E/AndroidRuntime(25984): at android.app.ContextImpl.registerReceiver(ContextImpl.java:1841)
2
E/AndroidRuntime(25984): at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:772)
E/AndroidRuntime(25984): at com.eopeter.fluttermapboxnavigation.activity.NavigationActivity.onCreate(NavigationActivity.kt:142)
E/AndroidRuntime(25984): at android.app.Activity.performCreate(Activity.java:8944)
E/AndroidRuntime(25984): at android.app.Activity.performCreate(Activity.java:8913)
E/AndroidRuntime(25984): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
E/AndroidRuntime(25984): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4146)
E/AndroidRuntime(25984): ... 12 more
E/AndroidRuntime(25984): Caused by: android.os.RemoteException: Remote stack trace:
E/AndroidRuntime(25984): at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:16580)
E/AndroidRuntime(25984): at android.app.IActivityManager$Stub.onTransact$registerReceiverWithFeature$(IActivityManager.java:11530)
E/AndroidRuntime(25984): at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2928)
E/AndroidRuntime(25984): at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3195)
E/AndroidRuntime(25984): at android.os.Binder.execTransactInternal(Binder.java:1375)
E/AndroidRuntime(25984):
I/TextToSpeech(25984): Setting up the connection to TTS engine...
I/Mapbox (25984): [nav-native]: No PersistentConfig found at /data/user/0/com.example.driverapp/files/mbx_nav/tiles/navigation/config.json
I/Mapbox (25984): [nav-native]: Async version config for mapbox/driving-traffic resolved with version 2024_04_28-03_00_04 [{"map":{"tileset_version":"2024_04_28-03_00_04"}}]
W/Mapbox (25984): [nav-sdk]: [BillingController] [code: TokenValidationFailed, message: Token validation failed for: this-can-be-skip-since-we-set-it-later]
I/Process (25984): Sending signal. PID: 25984 SIG: 9
Lost connection to device.
Exited.
The text was updated successfully, but these errors were encountered: