Forum Discussion
bhargav
12 months agoLevel 1.5: Cupcake
Can't access internet DPC app
Hello Everyone , i have created one policy in this one application added and added forcefully permission for internet. Device network management through disable wifi and SIM network permission fo...
rhj09
11 months agoLevel 1.6: Donut
Hi,
To ensure your DPC app always has internet access, you can create a policy that explicitly allows network connectivity. Here's how you can do it using the Android Management API:
Create a Policy with Network Permission:
- Ensure your policy includes permissions for internet access.
- Use defaultNetworkAccess in your policy to always allow internet access for the DPC app.
Example policy snippet:
{
"applications": [
{
"packageName": "your.dpc.app.package",
"installType": "FORCE_INSTALLED",
"defaultPermissionPolicy": "GRANT"
}
],
"networkInfo": {
"defaultNetworkAccess": "ALWAYS_ON"
},
"openNetworkInfo": {
"wifi": {
"ssid": "your_wifi_ssid",
"password": "your_wifi_password"
},
"cellular": {
"allowMobileData": true
}
}
}
Update Policy:
- Push this updated policy to ensure the DPC app maintains internet connectivity.
Troubleshoot Connectivity:
- Ensure there are no restrictive network settings that might block internet access.
- Check if the device has proper network configurations and permissions to connect to the internet.
By setting defaultNetworkAccess to ALWAYS_ON, your DPC app should maintain internet access whenever Wi-Fi or mobile data is enabled.
Hope this helps!