3 ms·
However, scanning and connecting to Wi-Fi IoT devices still requires it.
by radlad 3y ago
However, scanning and connecting to Wi-Fi IoT devices still requires it.
- izacus 3y agoNo it doesn't, there's a whole API for last few years where app can connect to its own IoT device without getting location or full scanning grant.
- radlad 3y agoWhy do you think that? I literally just wrote an app to do this. From my notes: > Android 13 still requires `ACCESS_FINE_LOCATION` to call `startScan()` and `getScanResults()` - `NEARBY_WIFI_DEVICES` is not sufficient See here: https://developer.android.com/reference/android/net/wifi/WifiManager#getScanResults https://developer.android.com/reference/android/net/wifi/Wif...() I tried getting by without it, but it was required.
- Larrikin 3y agoThat poster I assume is referring to this for your own devices. https://developer.android.com/guide/topics/connectivity/companion-device-pairing https://developer.android.com/guide/topics/connectivity/comp.... Depends on the specific use case but you ideally shouldn't need those calls. Our app request both the old location permission and the new nearby permission just because not all of our vendors keep their libraries up to date and its not unreasonable for the app to know where you are when using those features.
- radlad 3y agoThank you! I will give this a try.
- izacus 3y agoThe APIs to connect to IoT devices is called CompanionDeviceManager - https://developer.android.com/guide/topics/connectivity/companion-device-pairing https://developer.android.com/guide/topics/connectivity/comp...