Defined restrictions need to be checked at runtime in an application. This video goes through the process for loading the current values for the application restrictions created previously. The restrictions for the welcome message and feature activation will be loaded at application start time.
- [Instructor] Once we have manage configurations defined,…we need to set up our app to check the…values of these configurations when it starts or resumes,…and when they are changed.…In our example applications MainActivity,…we need to start by defining a RestrictionsManager object.…And I'm going to call this myRestrictionsManager.…In the onCreate method, let's define our…restrictions manager object…by getting the system service,…with the parameter being Context.RESTRICTIONS_SERVICE.…
Make sure we cast this as a restrictions manager.…Now that we have our service, in our onResume method,…we can get a bundle of application restrictions…by calling…getApplicationRestrictions…from the restrictions manager.…We can now access any configured application…restrictions using the keys we defined earlier.…Please keep in mind that the application restrictions bundle…will be empty if the application is not being managed…by a mobile device management system.…
For this reason, we should always start…by making sure the bundle has content.…
Instructor Jon-Luke West first reviews the key concepts of enterprise mobility management in Android: important APIs, the role of the device administrator, and the types of devices you should plan to target. He reviews the three primary use cases, including bring your own device (BYOD) and corporate-owned single-use (COSU) scenarios. Then he dives straight into the code, showing how to implement three enterprise integration features: managed application configurations, app pinning, and locked task mode. Finally, he shows how to test the features on a managed device.
- Enterprise mobility management (EMM) and mobile device management (MDM)
- Android EMM APIs
- Use cases: BYOD, work-manage devices, and COSU
- Checking restrictions and restriction changes for managed configurations
- App pinning and lock task mode
- Testing enterprise integration features using Test DPC