A basic app showing how to allow a device administrator to configurate an application using the Android Device Administration API. The app exports a managed configuration that enables or disables a UI control. Device Administration applications are able to enforce a specific value for this policy, as directed by enterprise administrators.
Managed configurations, previously known as application restrictions, allow the organization's IT admin to remotely specify settings for apps. This capability is particularly useful for organization-approved apps deployed to a work profile.
For example, an organization might require that approved apps allow the IT admin to:
- Allow or block URLs for a web browser
- Configure whether an app is allowed to sync content via cellular, or just by Wi-Fi
- Configure the app's email settings
You can find additional information about Managed configurations in the Set up managed configurations article.
The sample application uses the Jetpack Enterprise's app feedback API to send a messages back to the EMM when a new configuration is received for a couple of the available options.
The application can be tested locally using the TestDPC application available on the Play Store and on github.
You can follow he guide on github to understand how to setup TestDPC on a device and how to update the manage configuration of this demo application when installed in an a managed profile. We're providing here a couple of animations to show this process:
- Android Studio Dolphin | 2021.3.1
This sample uses the Gradle build system. To build this project, use the "gradlew build" command or use "Import Project" in Android Studio.
- Stack Overflow: http://stackoverflow.com/questions/tagged/android
If you've found an error in this sample, please file an issue: https://github.com/android/enterprise-samples/issues
Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.