AirWatch Managed Configuration Sample - AirWatch Android SDK

The AirWatch SDK provides the ability to pull a Managed Configuration from the AirWatch Console. The prerequisites for leveraging Managed Configuration using the Android platform are below:

  • An Android application integrated with the AirWatch SDK.
  • The SDK application pushed with managed configuration from the AirWatch Console.

 

Developing an application that supports Managed Configuration using AirWatch SDK

In order to retrieve the Managed Configuration from AirWatch, initialize an instance of SDKManager. Next, use the SDKManager method highlighted below to pull a Map of the keys and values.

private Map<String, String> fetchManagedConfiguration() {
     Map<String, String> values = null;

     if(sdkManager != null){
          try {
               values = sdkManager.getApplicationConfigSetting();
          } catch (AirWatchSDKException e) {
               e.printStackTrace();
          }
     }else{
          Toast.makeText(getContext(),"Please make sure your App is whitelisted with AW
               backend",Toast.LENGTH_LONG);
     }
     return values;
}

 

Sample app:

Developers can locate the implementation of Managed Configuration using the SDK in our AirWatch SDK Sample App for Android. It is located in the com.sample.airwatchsdk.ui.SDKAppConfigActivity package. If you do not have access to the AirWatch SDK package, contact your AirWatch account executive.

 

Publishing and updating Managed Configuration for your app within AirWatch

An AirWatch administrator can push the managed configuration for their enterprise application using following steps.

  1. Under the Internal App Detail view select Assign.
  2. Select the Smart Group and select Edit Assignment.
  3. Scroll down and enable App Configuration.
  4. Enter the key-value pairs required for the applications.
  5. Save and Publish the changes.

 

An AirWatch administrator can update the Managed Configuration for their enterprise application using following steps.

  1. Update the values for the Managed Configuration keys by navigating to Edit Application > Assignment > Application Configuration.
  2. Select Save and Publish.
  3. Navigate to App Details and select More > Send Application Configuration.
  4. If the application is running on the devices and the developer has correctly registered the application to receive the managed restriction broadcast from Android OS, then the application will receive the updated values pushed by AirWatch.
Have more questions? Submit a request

0 Comments

Article is closed for comments.