StartScan - Error in Samsung S5

0

This code for some reason does not work for me on a Samsung S5. This is the code

private final BroadcastReceiver wifiScanReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
    if (intent.getAction().equals(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION)) {
        wifiList = wifiManager.getScanResults();
        showWifis();
    }
}
};

public void detectWifi() {
registerReceiver(wifiScanReceiver, new IntentFilter(WifiManager.SCAN_RESULTS_AVAILABLE_ACTION));
wifiManager.startScan();
}

showWifis () what it does is show me an Alert Dialog telling me the networks and if I play a q connect, that works for me on all the phones except a Samsung S5 because it shows me the blank poster. The apk has all the permissions set, because as I said it works perfectly well in other terminals, some help ??

    
asked by Alex Rivas 22.05.2018 в 21:14
source

0 answers