Developing the first indigenous Android os MobileFirst application

Developing the first indigenous Android os MobileFirst application


To offer a local Google android program, MobileFirst Server must be aware of it. For this function, IBM MobileFirst Program Groundwork offers a Natural API selection, which contains a set of APIs and setup documents.mobitechstudio

This training points out how you can bring in the Android mobile phone Native API and how to incorporate it which has a natural Android operating system request. These methods are necessary to enable you to use it later on to accomplish jobs for instance hooking up to MobileFirst Web server, invoking adapter techniques, using authentication strategies, and the like.

Prerequisite . Creators should be skilled with making use of Google’s designer equipment.

Developing a MobileFirst Local API

  1. In MobileFirst Studio, create a MobileFirst job and give a MobileFirst Native API.
  2. Inside the New MobileFirst Natural API dialogue, key in the application title and select Google android for that Setting area.
  3. Appropriate-click on the gained NativeAPI folder (located within your-projects/apps/your-nativeapi-mobile app-name ) and select Work As > Deploy Indigenous API . This step becomes necessary for MobileFirst Server to realize the application form every time a demand actually gets to the hosting server.
  4. The MobileFirst local API features many ingredients:
  • has the online connectivity environments that the native Android operating system application uses.
  • worklight-android mobile phone.jar will be the MobileFirst API selection.
  • gcm.jar and push.png are for Google thrust notification services.

JSONStore folder is for recommended JSONStore service in local programs.

armabi. armabi-v7a. mips. and x86 folders are for recommended Program Genuineness Security in natural purposes.

As with all MobileFirst venture, you create the web server design by adjusting the files that will be on the server\conf directory.

You employ the software-descriptor.xml submit to clearly define application form metadata also to set up stability settings that MobileFirst Server enforces.

  • wlclient.qualities
  • The document retains machine configuration attributes and its end user-editable.
  • wlServerProtocol – The interaction process to MobileFirst Server, that may be both http or https.
  • wlServerHost – The hostname of MobileFirst Machine.
  • wlServerPort – The slot of MobileFirst Server.
  • wlServerContext -The situation actual route on the request for the MobileFirst Hosting server.
  • wlAppId – The application Identification as identified from the program-descriptor.xml document.
  • wlAppVersion – The applying variation.
  • wlEnvironment – Whatever target setting with the natural request.
  • wlUid – The property utilised by MTWW to spot this to be a MobileFirst software.
  • wlPlatformVersion – The MobileFirst Recording studio model.
  • languagePreferences – Directory of ideal locales.
  • GcmSenderId – This home specifies the GCM Sender ID to get used for push notices. By default, this residence is commented out.
  • Generating and configuring an Google android indigenous application
  • Generate a natural Android mobile phone program or work with an pre-existing 1.
  • Copy the worklight-google android.bottle. uicandroid.bottle. bcprov.bottle. and android-async-http.jar data from the WorklightAPI file to the new local Android operating system request, within the /libs directory site.
  • Duplicate the file wlclient.attributes coming from the MobileFirst local API directory on the new native Google android program, during the /investments directory website.
  • Increase this permissions into the AndroidManifest.xml file:
  • Add more the MobileFirst UI activity:

To acquire more information, evaluate the “Building natural programs for Google android” end user documentation theme Right after the program is run in Eclipse, one more result is a local request which contains the MobileFirst API selection. The given Studio room endeavor has a MobileFirst Studio room task with all the created NativeAPI folder. The supplied Native job includes an Android os application form currently set-up with all the MobileFirst NativeAPI.

Example software