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

Peer discovery Issue with Oreo (Android 8+) #17

Open
sabzo opened this issue Jan 23, 2018 · 7 comments
Open

Peer discovery Issue with Oreo (Android 8+) #17

sabzo opened this issue Jan 23, 2018 · 7 comments

Comments

@sabzo
Copy link
Collaborator

sabzo commented Jan 23, 2018

On Pixel 2: WifiDirect class: WifiP2pManager.PeerListListener's onPeersAvailable method fires but shows the list of devices as empty. It detects nearby devices but won't list them.

@sabzo
Copy link
Collaborator Author

sabzo commented Jan 27, 2018

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

@wxson7282
Copy link

I have the same problem in my project on Android 8. If the solution is OK, please let me know. Thank you.

@wxson7282
Copy link

On Android 8+ you should get permission of ACCESS_COARSE_LOCATION, or can not get device list.

@amos-yau
Copy link

amos-yau commented Feb 2, 2019

yep i found request the permission PLUS enable GPS will work.

@sabzo
Copy link
Collaborator Author

sabzo commented Feb 2, 2019

@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.

@chr33z
Copy link

chr33z commented Apr 6, 2019

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.

@sabzo
Copy link
Collaborator Author

sabzo commented Apr 9, 2019

@chr33z is this for Ayanda or on another project?

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

4 participants