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


Android client properties file

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

The mfpclient.properties 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 mfpclient.properties file, their descriptions, and possible values.

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

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 mfpclient.properties file.

wlServerProtocol=http wlServerHost=9.148.49.221 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 mfpclient.properties file is created, along with the correct values, and placed in the assets folder.

Parent topic: Developing native applications in Android Studio