Enterprise mobile app developers, and stake holders from specific line-of-businesses, work very hard to get mobile apps to their end-users very quickly.  The last thing they want to see is their users go through a terrible on-boarding experience . A simplified on-boarding experience for enterprise mobile users is not optional , but an absolute necessity.  Oracle Mobile Application Framework simplifies on-boarding for enterprise mobile users through it’s built in ability to support EMM managed app configurations. 

What are Managed App Configurations ?
Managed App Configurations are native APIs provided by iOS and Android, which provide the ability to dynamically set the properties of an application through an EMM console. This feature is extremely useful to manage the life cycle of an enterprise mobile application.

What are the benefits offered by Managed App Configurations ?
Managed App Configurations offer various advantages, and some of them are listed below.

1.Simplified on-boarding experience for enterprise mobile app users
Setup process for end users can be simplified , and help desk , documentation burden can be alleviated .For example, IT Administrators can leverage managed app configurations to pre configure the parameters of an enterprise mobile application, like Url, Email, Host, Port , Tenant Id etc so the end-users don’t have to enter them manually. This significantly improves the on-boarding experience for end-users.

2. End-Point Management
IT Administrators can change the API Endpoints, or any other backend connectivity related end-points which are used by the mobile application.

3. UI Customization
Change the look and feel of an application by loading different skins which are pre-seeded within the application.

Since Managed App Configurations provide a dynamic way to publish configuration related data to enterprise mobile apps, developers can use this for any use case which involves changing the behavior , look & feel , or functionality of the application dynamically. This feature can be used to support wide set of use cases related to enterprise mobile app lifecycle. 

Also, the AppConfig.org community provides excellent best practices on how to leverage the native Managed App Configuration feature on iOS and Android (for Work) platforms.

How can enterprise mobile app developers , IT Administrators benefit from Managed App Configurations ?

Even though the Managed App Configuration is a native feature of iOS and Android, the process of leveraging this feature is a coordinated effort between an enterprise mobile app developer, and an EMM IT Administrator. 

  • Role of an enterprise mobile app developer:
Enterprise mobile app developers must define these configurations (examples : Url, Email, Host, Port ,Tenant Id etc) within their apps. Also, these configuration values must be read within the app during the lifecycle of the app to appropriately change the behavior of the app. For example, the mobile app developers can define the routing of their application in such a way that, if the Url,Email,Host values are already pre populated in the app, the application skips the configuration page and switches over to the login page. 

While handing over the app to the IT Administrator, the mobile app developer provides some documentation on the type of configurations which are supported by the app. IT Administrators need this information while uploading and configuring the apps in the enterprise app catalog.

  • Role of an EMM IT Administrator:
EMM IT administrators receive the mobile app, and the documentation on the app configurations which are supported by the app. The IT Admin then logs into the EMM console, uploads the app, and then sets these configuration values on the app. IT Admin can also import the  apps which are listed in the public app store like iTunes,  Google Play and set configurations on them.

How can developers define, and read, Managed App Configurations in Oracle Mobile Application Framework ?

 Developers can define the Managed App Configurations in maf-application.xml file by adding the <adfmf:emmAppConfig> element, as shown in the example below. Each property tag has name , type and description attributes. For more details on the supported data types, MAF developers, and IT Administrators must refer to the documentation from their EMM vendor.

<adfmf:emmAppConfig>
<adfmf:property name=“remoteurl” type=“String” description=“URL of a remote web page“/>
<adfmf:property name="port" type="Integer" description=“Port number of the backend service”/>
<adfmf:property name=“enableEncryption" type=“Boolean" description=“Turn on app level encryption”/>
<adfmf:property name=“refreshDate" type=“Date" description=“Date on which application will be refreshed”/>
</adfmf:emmAppConfig>

You can read the property values at any time in the application lifecycle of your MAF application using the #{EMMConfigProperties} EL expression. For example, write an EL expression as follows to read the value of the remoteurl property: .

#{EMMConfigProperties.remoteurl}

You can also register your property change listener to listen to property changes by invoking the following code in a Java bean which implements the PropertyChangeListener interface. For a complete example, look at the snippet of code at the bottom of the blog.

EMMAppConfigScope.getInstance().addPropertyChangeListener(this);

After successfully reading the Managed App Configuration values, how can developers update the endpoints within the MAF application ?

After reading the configuration values, developers can invoke MAF ConfigService APIs to update the endpoints used by the MAF application. Endpoints used by MAF application are typically defined in connections.xml file which comes pre seeded with the application. The code snippet shown below uses the MAF ConfigService APIs to update the endpoint of a connection. In this specific example, line 1 is clearing the existing values of a connection called ‘RemoteURL’. Line 2 is updating the url attribute of a connection called ‘RemoteURL’.  Line3 is updating the application information without navigating away from the current feature. 

1. AdfmfJavaUtilities.clearSecurityConfigOverrides(“RemoteURL”);
2. AdfmfJavaUtilities.overrideConnectionProperty(“RemoteURL”, “urlconnection”, “url”, serverURL);
3. AdfmfJavaUtilities.updateApplicationInformation(false); 

Here is a complete snippet of code which reads , and updates the managed app configurations.

package application;

import javax.el.ValueExpression;
import oracle.adfmf.framework.EMMAppConfigScope;
import oracle.adfmf.framework.api.AdfmfContainerUtilities;
import oracle.adfmf.framework.api.AdfmfJavaUtilities;
import oracle.adfmf.java.beans.PropertyChangeEvent;
import oracle.adfmf.java.beans.PropertyChangeListener;
import oracle.adfmf.java.beans.PropertyChangeSupport;
import oracle.adfmf.util.Utility;

public class EMMBean implements PropertyChangeListener {

    public EMMBean() {
        super();
        EMMAppConfigScope.getInstance().addPropertyChangeListener(this);

    }

    // This method reads managed app configurations and updates the connection end points. 
    public void updateConnectionsEndpoints() {
        ValueExpression ve = AdfmfJavaUtilities.getValueExpression(“#{emmAppConfig.remoteurl}”, String.class); // reading a managed app configuration called ‘remoteurl’ which is defined in maf-application.xml
        String remotePageURL = (String)ve.getValue(AdfmfJavaUtilities.getELContext());
        if (!Utility.isEmpty(remotePageURL)) {
            AdfmfJavaUtilities.clearSecurityConfigOverrides(“RemoteURL"); // Clear the existing connection
            AdfmfJavaUtilities.overrideConnectionProperty(“RemoteURL”, “urlconnection”, "url", remotePageURL);// Set a new value (remotePageURL) to the connection
            AdfmfJavaUtilities.updateApplicationInformation(false);
        }    
    }

    // This method is invoked when the #{emmAppConfig.remoteurl} property changes
    @Override
    public void propertyChange(PropertyChangeEvent evt)
    {
        updateConnectionsEndpoints();        
    }

    public void addPropertyChangeListener(PropertyChangeListener l)
    {
      propertyChangeSupport.addPropertyChangeListener(l);
    }

    public void removePropertyChangeListener(PropertyChangeListener l)
    {
      propertyChangeSupport.removePropertyChangeListener(l);
    }

    private PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);

    public void setPropertyChangeSupport(PropertyChangeSupport propertyChangeSupport) {
        PropertyChangeSupport oldPropertyChangeSupport = this.propertyChangeSupport;
        this.propertyChangeSupport = propertyChangeSupport;
        propertyChangeSupport.firePropertyChange("propertyChangeSupport", oldPropertyChangeSupport,
                                                 propertyChangeSupport);
    }

    public PropertyChangeSupport getPropertyChangeSupport() {
        return propertyChangeSupport;
    }
}

Which version of MAF supports the ability to read Managed App Configurations ?

MAF 2.3.1, and future releases.

Which EMM vendors are supported by MAF’s Managed App Configuration API  ?

This feature is certified and supported with AirWatch, MobileIron but it is expected to work with any EMM vendor which supports the native Managed App Configuration feature of iOS and Android.

What are the minimum iOS and Android versions required for Managed App Configuration support ?
iOS9, and Android5.0 (needs Android for Work environment)

Resources
MAF Documentation: (Resource for MAF developers )

AirWatch Documentation : (Resource for AirWatch IT Administrators)
Here is a link to AirWatch Mobile Application Management Guide which talks about how to create and apply managed app configurations in AirWatch console. Navigate to Chapter 4 : Internal Applications > Advanced section, which covers this information .

MobileIron Documentation: (Resource for MobileIron IT Administrators)
Here is a link to MobileIron CORE Device Management Guide which talks about how to create and apply managed app configurations in MobileIron CORE console (Resource for IT Administrators)
Look for the section on ‘Managed app configuration settings’

Resources from AppConfig.org
Here is a link to Managed App Configurations for App Developers guide which is created by the AppConfig community. This guide explains this topic in detail, and covered iOS and Android platforms. 

Author