New permission apk
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
New permission apk
Please add a new apk for android.permission.ACCESS_WIFI_STATE
It will allow us to know the wifi network name.
It will allow us to know the wifi network name.
Bruno
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: New permission apk
Done, please try it: https://www.lightninglauncher.com/permi ... _state.apk
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
Re: New permission apk
No more error. Thanks
Last edited by brunoisa10 on Wed Mar 06, 2019 1:56 pm, edited 1 time in total.
Bruno
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium
- TrianguloY
- Posts: 109
- Joined: Thu Jan 24, 2019 9:46 am
Re: New permission apk
On Oreo the location should be turned on too (and granted coarse permission from settings) for that code.
There seem to be another way which doesn't require the location (it does require the apk permission).
Source: https://stackoverflow.com/a/54329736
There seem to be another way which doesn't require the location (it does require the apk permission).
Code: Select all
var cntx = getBackgroundScreen().getContext();
var manager = cntx.getSystemService (cntx.WIFI_SERVICE);
var wifiInfo = manager.getConnectionInfo();
var listOfConfigurations = manager.getConfiguredNetworks();
for (var index = 0; index < listOfConfigurations.size(); index++) {
var configuration = listOfConfigurations.get(index);
if (configuration.networkId == wifiInfo.getNetworkId()) {
return configuration.SSID;
}
}
return null;
-
- Posts: 88
- Joined: Sun Jan 27, 2019 7:31 pm
- Location: Westende Belgium