For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.

Android client properties file

The file defines the properties that your native app for Android requires to use the MobileFirst native API for Android.

The file is created when you register your Android app on the MobileFirst Development Server (see Registering Android applications to MobileFirst Server). If you register your using the IBM MobileFirst Platform Operations Console we must create the file manually and place it within your Android Studio project.

The following table lists the properties of the file, their descriptions, and possible values.

Table 1. Properties and values of the file
Property Description Example values
wlServerProtocol The communication protocol with the MobileFirst Server. http or https
wlServerHost The host name of the MobileFirst Server.

If the MobileFirst Server host has an IPV6 address, then use the mapped host name instead of providing the raw IP address. This is a known limitation.

wlServerPort The port of the MobileFirst Server. 9080
wlServerContext The server context. This value can be seen in the MobileFirst Operations Console dashboard. It is the value of the app's runtime. By default the values is /mfp/. /mfp/
wlPlatformVersion The MobileFirst version 8.0.20160214
languagePreferences Preferred language. en
Below is an example file.

wlServerProtocol=http wlServerHost= wlServerPort=9080 wlServerContext=/mfp/ wlPlatformVersion=8.0.20160214 languagePreferences=en

Note: We can create this file manually and place it in the [project]\app\src\main\assets folder of your Android Studio project folder. Add the assets folder if it does not exist under the main folder. When we register the app by using MobileFirst Platform CLI the file is created, along with the correct values, and placed in the assets folder.

Parent topic: Developing native applications in Android Studio