-
Notifications
You must be signed in to change notification settings - Fork 21
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
Peer discovery Issue with Oreo (Android 8+) #17
Comments
It turns out on Android 8+ at least as it relates to the Pixel 2, Location has to be turned on in order to discover nearby devices through Wifi Direct! cc @n8fr8 Issue somewhat similar to https://stackoverflow.com/questions/32151603/scan-results-available-action-return-empty-list-in-android-6-0 |
I have the same problem in my project on Android 8. If the solution is OK, please let me know. Thank you. |
On Android 8+ you should get permission of ACCESS_COARSE_LOCATION, or can not get device list. |
yep i found request the permission PLUS enable GPS will work. |
@wxson7282 @amos-yau yea -- the Android docs don't clearly cover that part. I'm resuming development soon and I'd like to add Unit Tests. |
On my OnePlus 3 (8.0.0) peer discovery only returned a result list when ACCESS_COURSE_LOCATION was granted and GPS was turned on. The wifi direct manager in the OxygenOS settings however showed an advertising peer without GPS turned on. |
@chr33z is this for Ayanda or on another project? |
On Pixel 2:
WifiDirect
class:WifiP2pManager.PeerListListener
'sonPeersAvailable
method fires but shows the list of devices as empty. It detects nearby devices but won't list them.The text was updated successfully, but these errors were encountered: