Page 1 of 1

New permission apk

Posted: Thu Feb 28, 2019 4:34 pm
by brunoisa10
Please add a new apk for android.permission.ACCESS_WIFI_STATE

It will allow us to know the wifi network name.

Re: New permission apk

Posted: Fri Mar 01, 2019 1:42 pm
by brunoisa10
please @Pierrot :)

Re: New permission apk

Posted: Wed Mar 06, 2019 7:57 am
by Pierrot

Re: New permission apk

Posted: Wed Mar 06, 2019 1:31 pm
by brunoisa10
No more error. Thanks

Re: New permission apk

Posted: Wed Mar 06, 2019 1:55 pm
by brunoisa10
Working fine.
Something with gps settings here

Thanks a ton

Re: New permission apk

Posted: Wed Mar 06, 2019 2:30 pm
by TrianguloY
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).

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;
Source: https://stackoverflow.com/a/54329736

Re: New permission apk

Posted: Wed Mar 06, 2019 3:44 pm
by brunoisa10
Image

Thanks a lot.