-
Notifications
You must be signed in to change notification settings - Fork 171
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
Nearby Devices permission on Android 12 and Above #1839
Comments
|
multi_high_bandwidth debug and release. If needed I can retest with another build variant.
The same results with an official Nokia 8.3 on Android 12. |
|
The issue continues to persist after switching to the multi_sec_off build variant.
The issue is also reproducible with two instances of HelloSDL Android (instead of iHeartRadio). I can update the ticket to reflect this info if needed. |
This is definitely a case we protected for as much as we could and included in our testing before release so it should not be showing as described. |
Before you allow the permissions on the second app, have you tried reconnecting bluetooth or pressing the "find new apps" button? There is code that helps prevent the notification from appearing on cases where the BT device isn't SDL enabled and sometimes that requires the user to reconnect or perform an SDP query a second time (eg pressing the "find new apps" button) if it is the first that app is hosting the router service. |
A bluetooth toggle or find apps query does not resolve the issue. From testing thus far, if the service that hosts the connection does not have the Nearby device permission granted neither of the apps will connect. If the service that hosts the connection has nearby devices granted, both apps connect (even if the non-host has Nearby devices permission disabled). |
Right, which is why there is code to try and prevent that from happening: // If all apps have a RS newer than the Android 12 update,
// chosen app does not have BT Connect permissions, and more than 1 sdl app is installed
if (!isPreAndroid12RSOnDevice(sdlAppInfoList)
&& !AndroidTools.isPermissionGranted(BLUETOOTH_CONNECT, context, routerServicePackage)
&& sdlAppInfoList.size() > 1) {
for (SdlAppInfo appInfo : sdlAppInfoList) {
if (AndroidTools.isPermissionGranted(BLUETOOTH_CONNECT, context, appInfo.getRouterServiceComponentName().getPackageName())) {
//If this app in the list has BT Connect permissions, we want to use that apps RS
routerServicePackage = appInfo.getRouterServiceComponentName().getPackageName();
break;
}
}
} Can you confirm the two applications used were the only SDL enabled apps on the device? This is important because if there is an app that is on the device that doesn't have the newer library with these changes then the old logic for RS starting will be used (newest RS is started regardless of permission status), this is an unchangeable legacy issue. |
To eliminate variables all other SDL enabled apps have been uninstalled. Only the two instances of HelloSDL remain... tested repeatedly, but the issue still exists. |
I have tested with two instances of HelloSDL and do not see the issue you describe.
Also to clarify FordPass and Webex are SDL apps that could have an older implementation of SDL |
Can you run your test again using the two apk's in the zip file provided: |
@JulianKast so far the samples you attached look to have an improvement in connectivity. Did the apps include library or app side changes? |
Both apps are HelloSdl using unmodified versions of SDL on build variant For our app partners, we have noticed two common issues that can be resolved by:
|
The two instances of HelloSDL that were provided register consistently when they are the only SDL enabled apps installed on the device, however after installing another SDL enabled app like Pandora or iHeartRadio from the production Play store none of the SDL apps register (including the HelloSDL instances). If the newest service is being used for the connection, I believe the HelloSDL apps should have registered in this scenario? |
I am unable to reproduce any library specific issues with apps that have 5.4+ version of the library and correct implementations of SDL.
Situation 3 and 4 are problems. If the app with the pre-Android 12 compatible SDL library (<5.4) is installed on the device but they target Android 12 and do not have the Nearby Device permission granted, they will never receive the BT connected intent and therefore never start a router service. This prevents the redundancy permission check from happening inside the RS that will start the next RS if it doesn't have the correct permissions. I can say this was not a case that seems to be protected for in the library. Since targeting Android 12 was not a requirement from Google until recently, there was no way for us to know if an app was targeting Android 12 or newer. If they targeted less than Android 12 then they would not need the Nearby Device permission to receive the BT connected intent. It is plausible that we add yet another step in this complicated process that checks specifically for this scenario (older libraries installed but Nearby Devices permission not granted with the assumption that all apps must now target Android 12+) and in that case use the same logic for when only newer SDL libraries are installed. However, even if we add this, the problem only solves itself over time as apps update their libraries and users grant those apps the correct BT permissions. This assumes that apps also have correct implementations of SDL. |
Hot Fix for #1839. Adding fallback logic for starting router service
Bug Summary
This issue is related to #1794. The app connection and registration fails when multiple apps are installed and a single app does not have permission for nearby devices on Android 12 and above. The scenario in the reproduction steps can be replicated by using a combination of iHeartRadio from the production Play Store. and HelloSDL built from the latest master branch in the java suite.
Reproduction Steps
Expected Behavior:
Nearby device permission settings for one app do not impact the settings for another app. In the case above, the Nearby device permission from iHearthRadio should not impact the registration of HelloSDL
Observed Behavior:
The Nearby devices app permission settings for a single app does impact other apps (in the case above HelloSDL cannot register due to iHeartRadio missing permission for Nearby devices).
Which projects have you seen this bug on?
Android
Android Version(s)
12
Android Device(s)
EssentialNokia 8.3sdl_java_suite Version
5.6.0
Testing Environment(s)
Relevant log output
No response
The text was updated successfully, but these errors were encountered: