+

Search Tips   |   Advanced Search

Application Descriptor of Native API application for Android

The application descriptor is a metadata file used to define various aspects of the Native API application for Android.

The application descriptor is a metadata file used to define various aspects of the application. It is in the application root directory, and its name is application-descriptor.xml.

The following example shows the format of the application descriptor file of Native API applications for Android:

<?xml version="1.0" encoding="UTF-8"?>
<nativeAndroidApp 
  id="android"
  platformVersion="6.0.0"
  securityTest="security test name"
  version="1.0"
  xmlns="http://www.worklight.com/native-android-descriptor">
  <displayName>application display name</displayName>
  <description>application description</description>
  <pushSender key="gcm api key" senderId="gcm project number"/>
  <publicSigningKey>application public signing key</publicSigningKey>
</nativeAndroidApp>

The content of the application descriptor file is as follows.

<?xml version="1.0" encoding="UTF-8"?>
<nativeAndroidApp 
  id="android"
  platformVersion="6.0.0"
  securityTest="security test name"
  version="1.0"
  xmlns="http://www.worklight.com/native-android-descriptor">

The <nativeAndroidApp> element is the root element of the descriptor. It has three mandatory attributes and one optional attribute:

id

This attribute specifies the ID of the application. The ID must be identical to the application folder name. It must be an alphanumeric string that starts with a letter. It can contain underscore ("_") characters. It must not be a reserved word in JavaScript.

platformVersion

Contains the version of MPF on which the app was developed.

version

This attribute specifies the version of the application. This version is a string of the form x.y, where x and y are numbers. It is visible to users who download the app from the app store or market.

securityTest

This attribute specifies a security configuration defined in authenticationConfig.xml. When a client attempts to access a protected resource, IBM MobileFirst Platform Foundation checks whether the client is already authenticated according to the security test. If the client is not yet authenticated, IBM MobileFirst Platform Foundation starts the process to obtain the client credentials and to verify them.

This attribute is optional.

<displayName>

This element contains the application name. This name is visible in theoperations console and is copied to the descriptor files of various web and desktop environments.

<description>

This element contains the application description. This description is visible in the operations console and is copied to the descriptor files of various web and desktop environments.

<pushSender>

This element contains the connectivity details to Google GCM (Android push notification service). The key is the GCM API key, and the senderId is the GCM Project Number.

<publicSigningKey>

This element contains the public key of the developer certificate used to sign the Android app. To extract this value, see Extracting a public signing key from native apps.

</nativeAndroidApp>

This tag closes the content of the application descriptor file.


Parent topic: Develop native applications for Android