kirillzyusko / react-native-wifi-p2p

Library that provide access for working with wi-fi direct (p2p) module in android.
173 stars 32 forks source link

Unable to startPearDiscovery - Android 10 #101

Open BRAVO68WEB opened 2 months ago

BRAVO68WEB commented 2 months ago

Env

Device Name: POCO F1 Android Version: 10 React Native Version: 0.74.2

Issue

I am not able to start peer discovery on Andorid 10. It is working on Android 13+

Code sample

Looks like ACCESS_COARSE_LOCATION and ACCESS_BACKGROUND_LOCATION is granted, but others are never_ask_again

Adb Logcat

logcat.log

kirillzyusko commented 1 month ago

Hello 👋

From the logs:

WifiPermissionsUtil: UID 10413 has no location permission

I think you need to grant permissions properly 🤔

BRAVO68WEB commented 1 month ago

I gave it BTW @kirillzyusko

kirillzyusko commented 1 month ago

@BRAVO68WEB but according to logs the service doesn't have a permission and because of that it can not be started 🤷‍♂️

BRAVO68WEB commented 1 month ago

But my ACCESS_FINE_LOCATION says granted

kirillzyusko commented 1 month ago

@BRAVO68WEB my expectation is that never_ask_again !== granted. Again, I would trust logcat output - if it's saying that location permission is not granted, then it means it's not granted and you need to figure out what's going wrong there...

BRAVO68WEB commented 1 month ago

Any hints what and where to check?

My background in not from Android but Web and DevOps

kirillzyusko commented 1 month ago

@BRAVO68WEB try to grant proper location permission. Can't give more exact direction - I don't have real Android 10 device.The only one way here is trial and error. Maybe try to use react-native-permission library 🤷‍♂️