Skip to content
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 Connections permissions documentation wrong/inconsistent #297

Open
KRA2008 opened this issue Sep 22, 2023 · 0 comments
Open

Nearby Connections permissions documentation wrong/inconsistent #297

KRA2008 opened this issue Sep 22, 2023 · 0 comments

Comments

@KRA2008
Copy link

KRA2008 commented Sep 22, 2023

(This bug is about Nearby Connections but it is NOT the recent big bug google/nearby#2124)

Just to start with, my app has been in production with successful Nearby Connections functionality for a couple years. I last published it targeting Android 11, but I'm now trying to update my targetSdkVersion and I need to deal with the new permissions. I'm only changing permissions handling.

  1. The example is not consistent with the documentation in a couple places. My first thought is that the example is out of date, but that doesn't make sense with the ways the maxes and target line up.
    Compare and contrast:
    https://developers.google.com/nearby/connections/android/get-started
    https://github.com/android/connectivity-samples/blob/main/NearbyConnectionsWalkieTalkie/app/src/main/AndroidManifest.xml

Differences:

  • Fine Location maxes at 32 in the example, but 31 in the documentation.
  • Coarse Location maxes at 32 in the example, but 28 in the documentation.
  • The example is missing a bunch of the other min/max sdk attributes that the documentation has, but some of those in the documentation seem to be wrong (if the example actually had these set up the issues would become obvious when the example is run), as shown below:

  1. The documentation is not consistent with what I'm finding when targeting Android 13 (level 33) and running on an Android 12.1 (level 32) device.

Issues:

  • Documentation claims Nearby Wifi Devices needs minSdk of 32, but when I run that on my level 32 device the runtime permission request always returns DENIED. When I turn the minSdkVersion property of it up to 33 (don't use it at all on my level 32 test device) then I am able to scan and connect (after I do the below too).
  • Documentation claims Access Wifi State and Change Wifi State needs a maxSdk of 31, but when I run my app on my level 32 device I'm not able to scan, as I get errors that both of those permissions are required. Once I remove the maxSdkVersion attributes of those two (DO request them on my level 32 device) then I am able to scan and connect (after I do the above too).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant