New permission apk

Something is missing? Have an idea? Ask for new stuff here.
Post Reply
brunoisa10
Posts: 88
Joined: Sun Jan 27, 2019 7:31 pm
Location: Westende Belgium

New permission apk

Post by brunoisa10 » Thu Feb 28, 2019 4:34 pm

Please add a new apk for android.permission.ACCESS_WIFI_STATE

It will allow us to know the wifi network name.
Bruno 8-)

brunoisa10
Posts: 88
Joined: Sun Jan 27, 2019 7:31 pm
Location: Westende Belgium

Re: New permission apk

Post by brunoisa10 » Fri Mar 01, 2019 1:42 pm

please @Pierrot :)
Bruno 8-)

User avatar
Pierrot
Site Admin
Posts: 181
Joined: Wed Jan 23, 2019 12:18 pm
Location: French Alps

Re: New permission apk

Post by Pierrot » Wed Mar 06, 2019 7:57 am


brunoisa10
Posts: 88
Joined: Sun Jan 27, 2019 7:31 pm
Location: Westende Belgium

Re: New permission apk

Post by brunoisa10 » Wed Mar 06, 2019 1:31 pm

No more error. Thanks
Last edited by brunoisa10 on Wed Mar 06, 2019 1:56 pm, edited 1 time in total.
Bruno 8-)

brunoisa10
Posts: 88
Joined: Sun Jan 27, 2019 7:31 pm
Location: Westende Belgium

Re: New permission apk

Post by brunoisa10 » Wed Mar 06, 2019 1:55 pm

Working fine.
Something with gps settings here

Thanks a ton
Bruno 8-)

User avatar
TrianguloY
Posts: 107
Joined: Thu Jan 24, 2019 9:46 am

Re: New permission apk

Post by TrianguloY » Wed Mar 06, 2019 2:30 pm

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

brunoisa10
Posts: 88
Joined: Sun Jan 27, 2019 7:31 pm
Location: Westende Belgium

Re: New permission apk

Post by brunoisa10 » Wed Mar 06, 2019 3:44 pm

Image

Thanks a lot.
Bruno 8-)

Post Reply