ConnectivityManager.requestNetwork in Android 6.0

后端 未结 2 1273
庸人自扰
庸人自扰 2021-02-01 04:37

I\'m trying to get the new ConnectivityManager.bindProcessToNetwork(Network) using ConnectivityManager.requestNetwork(NetworkRequest, ConnectivityManager.Netw

2条回答
  •  花落未央
    2021-02-01 05:00

    This was an Android 6.0 bug. It's fixed in Android 6.0.1, requestNetwork() can be called if you request CHANGE_NETWORK_STATE in the manifest. No need to call requestPermissions(), it's a normal permission.

提交回复
热议问题