Creating your first local Android MobileFirst app
Analysis
To serve a local Android operating system request, MobileFirst Host must be aware of it. For this function, IBM MobileFirst Program Basis provides for a Indigenous API catalogue, containing a set of APIs and arrangement data.android app space
This tutorial talks about the best way to create the Android operating system Natural API and ways to blend it by using a natural Android mobile phone application form. These techniques are necessary to help you use it in the future to achieve jobs for example relating to MobileFirst Host, invoking adapter methods, implementing authentication solutions, etc.
Precondition . Builders needs to be skilled with utilizing Google’s developer equipment.
Developing a MobileFirst Natural API
- In MobileFirst Studio, create a MobileFirst job and put in a MobileFirst Natural API.
- From the New MobileFirst Natural API dialogue, key in your application identity and select Android for the Surroundings area.
- Perfect-select the developed NativeAPI folder (situated in your-assignments/applications/your-nativeapi-app-name ) and select Jog As Andgt; Deploy Local API . This action is necessary for MobileFirst Hosting server to distinguish the application form if a demand extends to the hosting server.
- The MobileFirst native API includes several components:
- wlclient.properties has got the online connectivity options a local Google android application makes use of.
- worklight-android mobile phone.jar could be the MobileFirst API selection.
- gcm.jar and drive.png are for Search engines force notification products and services.
JSONStore directory is for optionally available JSONStore support in native apps.
armabi. armabi-v7a. mips. and x86 folders are for recommended Program Reliability Protection in local applications.
As with any MobileFirst job, you create the host setup by altering the documents that will be within the server\conf directory.
You apply the app-descriptor.xml submit to determine app metadata as well as configure security adjustments that MobileFirst Server enforces.
- wlclient.qualities
- The wlclient.homes report maintains machine setting properties as well as being end user-editable.
- wlServerProtocol – The communicating process to MobileFirst Hosting server, that could be possibly http or https.
- wlServerHost – The hostname of MobileFirst Web server.
- wlServerPort – The dock of MobileFirst Hosting server.
- wlServerContext -The context basic course of your app around the MobileFirst Server.
- wlAppId – The application form Identification as outlined within the program-descriptor.xml data file.
- wlAppVersion – The application release.
- wlEnvironment – The target atmosphere from the natural software.
- wlUid – The home and property applied by MTWW to identify this as a MobileFirst program.
- wlPlatformVersion – The MobileFirst Studio room edition.
- languagePreferences – Number of desired locations.
- GcmSenderId – This property describes the GCM Sender ID for use for press notifications. Automatically, this residence is commented out.
- Developing and configuring an Android native request
- Create a local Android program or make use of pre-existing just one.
- Replicate the worklight-android mobile phone.jar. uicandroid.bottle. bcprov.bottle. and google android-async-http.bottle data files from your WorklightAPI file into the new native Android program, in the /libs directory site.
- Duplicate the document wlclient.components through the MobileFirst natural API file on the new indigenous Android mobile phone application, in the /resources web directory.
- Create the following permissions towards the AndroidManifest.xml file:
- Include the MobileFirst UI pastime:
To acquire more information, study the “Building natural software for Android mobile phone” customer paperwork subject Once the software is manage in Eclipse, one more end result is a native request that contains the MobileFirst API catalogue. The supplied Business endeavor has a MobileFirst Recording studio job while using gained NativeAPI directory. The given Native job includes an Android mobile phone application form definitely startup with the MobileFirst NativeAPI.
Sample program