Setting Network Permissions

To access network services on an Android device, you must have the appropriate permissions. An Android application can use most networking services only if it is granted the appropriate <uses-permission> settings configured in the Android manifest file.

The following are some common permission values used by applications leveraging the network:

► android.permission.INTERNET

► android.permission.ACCESS_NETWORK_STATE

There are a number of other permissions related to networking, including those that allow access and changes to Wi-Fi state and network state. You might also want to look at android.permission.WAKE_LOCK, to keep the device from sleeping.

0 0

Post a comment