Caused by: java.lang.SecurityException: Broadcast android.net.wifi.supplicant.STATE_CHANGE not available to instant apps
Caused by: java.lang.SecurityException: Broadcast android.net.wifi.WIFI_STATE_CHANGED not available to instant apps
MethodInvocationProxy : Exception while calling method public abstract android.os.Messenger android.net.wifi.IWifiManager.getWifiServiceMessenger() throws android.os.RemoteException
java.lang.SecurityException: Method class android.net.wifi.IWifiManager$Stub$Proxy.getWifiServiceMessenger not available to instant apps
This is correct. The connectivity states can not be changed through an Instant App.
Please refer to the documentation for more info on supported permissions.
register: IntentFilter(WifiManager.WIFI_STATE_CHANGED_ACTION); IntentFilter(WifiManager.SUPPLICANT_STATE_CHANGED_ACTION);