-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fixes for API 34 #90
Fixes for API 34 #90
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.
Thanks for your fix 💙
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.
Thanks for providing these changes @joshhood, would you mind adding a CHANGELOG entry?
Hi, sorry for slow reply, have added entry to CHANGELOG now |
Thanks a lot for the PR! |
@@ -151,7 +151,7 @@ private PendingIntent createPendingOpenIntent(Context context) { | |||
|
|||
private void registerReceiver(Context context) { | |||
if (context != null) { | |||
context.registerReceiver(endNavigationBtnReceiver, new IntentFilter(END_NAVIGATION_ACTION)); | |||
context.registerReceiver(endNavigationBtnReceiver, new IntentFilter(END_NAVIGATION_ACTION), Context.RECEIVER_NOT_EXPORTED); |
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.
May bad, I seeing this too late. This call of registerReceiver
is only available for API +26.
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.
I'm currently investigate some time in #94. And will fix this too on this way.
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.
Thanks for investigating @Fabi755
Currently there are two crashes occuring when attempting to use the MockNavigationActivity on Android API 34:
java.lang.SecurityException: com.mapbox.services.android.navigation.testapp: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
java.lang.SecurityException: Starting FGS with type location callerApp=ProcessRecord{a043266 10859:com.mapbox.services.android.navigation.testapp/u0a410} 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