Create Simple Java Adapter for MobileFirst Foundation 8.0 IBM – Eclipse

Create Simple Java Adapter for MobileFirst Foundation 8.0 IBM – Eclipse

1.) Open Eclipse ( I used Eclipse Mars) , Create New Maven Project in Eclipse.


2.) Add the Archetype (using – adapter-maven-archetype-java) :


3.) Add the Group Artifact.

Group id : (is your domain) com.fndong.mfp

Artifact id:(Your Project name) AdapterMfp


  • Click Finnish button.


  • It will generate the structure of java project with pom.xml

4.) Building an adapter. – Using cmd windows with mfp -mobilefirst CLI.

  • Go to Root project , type this command : mfpdev adapter build


5.) Run the MobileFirst Foundation Server 8.0, so you can deploy the adapter to console.

  • Run Mobilefirst CLI command : mfpdev adapter deploy -x


6.) Check the mobilefirst console :


7.) Testing the AdapterMfp application, Click Adapter application and click tab Resources > Click button View Swagger Docs.

7.1.) test the Restful GET



Adding the IBM MobilFirst SDK to Android Application – Hello World

Good Day! & Happy New Year 2017 Gregorian Calendar

1.) Create New Project in Android Studio. Select File > New Project.

2.) Enter new Project, add the name for the project with the name of the package, example:

New Project name : MyApp

company domain : com.fndong.myApp

3.) Then After created, adding the SDK into android MyApp Application.

3.1) Add the sdk plugin mobilefirst android in build.gradle (Module:App).

apply plugin: ''
android {
    compileSdkVersion 23
    buildToolsVersion "25.0.2"

    packagingOptions {
        pickFirst 'META-INF/ASL2.0'
        pickFirst 'META-INF/LICENSE'
        pickFirst 'META-INF/NOTICE'

    defaultConfig {
        applicationId ""
        minSdkVersion 22
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), ''

dependencies {
    compile ''
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile ''

4.) Add the Permission and the Mobilefist UI activity in the AndroidManifest.xml.

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  • add inside tag <application…>
<activity android:name="com.worklight.wlclient.ui.UIActivity" />

5.) Running emulator – just go here android_page

6.) Go to Run – app / (Shift+ F10) – then it will show your first Mobile App with Mobilefist SDK for Android.


7. Add the registration of the application with mobilefirst server – and add the

  • using node.js prompt – set this command : mfpdev app register (must run the mobilefirst Foundation server 8.0 – for console first)

Create Cordova Application Project (Client) using MobileFirst CLI

Create Cordova Project using MobileFirst CLI (IBM Site)

1.) First , open node.js command prompt ( for windows OS), in the workspace Start create Project > (cmd) – cordova create myFirstCordova com.fndong.HelloWorld –template cordova-template-mfp


2.) After Created, add the Android platform, I’ll using android version android@5.1.1. Go to directory project myFirstCordova > run command : cordova platform add android@5.1.1.


3) set the config.xml which will added elements such as mfp, server, locale and Extensions. Command : mfpdev app config


4.) Register Project Cordova to MobileFirst Console Server. command : mfpdev app register.

run the cordova prepare:

cordova prepare

 5) To run the App in IBM Simulator. command : mfpdev app preview.

7) Creating Adapter

Create a Cordova mobileFirst Project in Eclipse Mars 2

 Create a Cordova mobileFirst Project in Eclipse Mars 2.

1.) Create new Project Cordova ,  Right Click > New > Hybrid Mobile(Cordova) Application Project > Next > (and add the Project Name: , Name:, ID:)


2.) (Get the mobile Engine – download android sdk 5.1.1) Next > Download .. choose option SDK Android 5.1.1


3.) Add the Cordova Plugin – mfp* , select – cordova-plugin-mfp.


4.) Select to confirm plugins to be downloaded from registry.


5.) Finish.

6.) Deploy and Start your application on MobileFirst Console Foundation 8.0

6.1.) Start the Server MobileFirst Console Foundation 8.0.

  • Here I’m using cygwin (linux in windows) terminal to run MobileFirst.


  • //MobileFirst-
  • $ sh

7.) Make sure your console up like below image:


8.)Edit your index.html to change the view of your first page App mobile.


  • change the html code ( I just added the blue lines) :
        <h1>This your First Application</h1>
        <h2>Welcome to cordova mobileFirst</h2>

9.) In Eclipse , Right Click Project > IBM MobileFirst Platform Foundation > Register App.


10.) To run Application to Emulator IBM, Right Click Project > IBM MobileFirst Platform Foundation > Preview App. Automatically will load to the browser – emulator.


Selamat Berjaya….2016 – Donald Trump Won USA Presidency

Create Cordova mobile App using IBM MobileFirst Foundation 8.0 + Eclipse Mars + Android v 5.1.1 + Node.js + Java 8

Create Cordova mobile App using IBM MobileFirst Foundation 8.0 + Eclipse Mars + Android v 5.1.1 + Node.js + jdk 8.

1.) Prerequisite.

1.1) MobileFirst Foundation Development Kit : Download
1.2) A Mars 2 Java EE version of Eclipse, or later. : Download
1.3)  Jdk version 8 : Download
1.4) Node.js version 4.x, or later. : Download
1.5) The Cordova command-line interface, version 6.1.1, or later.
1.6)  The IBM MFP Command Line Interface (CLI).
1.7) Android Version 5.1.1. (Just Download using eclipse Mars)

2) After Download MobileFirst Foundation Development Kit – take version 8.0, Installed.

  • To test the server MobileFirst Foundation 8.0, $ sh


2.1.) Check the http://localhost:9080/mfpconsole/index.html#/dashboard


3) Install Eclipse Mars or later.

4) After Installed Eclipse Mars, get the IBM Mobilefist Plugin 8.0, Help > Eclipse MarketPlace..


5.) get Thym 2.0 Plugin, for developing Hybrid Mobile Application.


6.) After node.js installed, run the cordova  command-line on Windows:

  • checking node version
node -v
  • Installing cordova.

   npm install -g cordova

7.)  Add the plugin Android Development Tools.


7.1.) after added the ADT, make sure to installed Android 5.1.1 SDK.


8.) Add the The IBM MFP Command Line Interface (CLI) into node.js.

  • Command-line window, run the command: npm install -g mfpdev-cli.

9.) (Next tutorial) – Start creating a Cordova mobileFirst Project in Eclipse Mars 2.