Friday, 15 May 2015

A basic Android application development in IBM Worklight

How to install Worklight?
Steps:
1)Follow the steps in http://www.ibm.com/developerworks/mobile/worklight/download/studio.htmland get Juno Eclipse and Worklight plugin installed
Your IDE environment looks as below,


2)After installation when you try to open eclipse,if you are getting the below error
,


Your OS is 64-bit.You have installed eclipse juno as 64 bit.But your java jre is 32 bit.
Its evident by executing the below command,
If java installed is 64-bit,it would show the result of java –version as 64 bit.
Now after installing java-64 bit,

After successfully opening the IDE,now time to start with our Application development.
To view the application in IE,
On Preview console:
Now Previewing at Android mobile:


Mobile Browse Simulator

Simulator vs Emulator
A simulation is a system that behaves similar to something else, but is implemented in an entirely different way. It provides the basic behavior of a system but may not necessarily abide by all of the rules of the system being simulated. It is there to give you an idea about how something works.
Think of a flight simulator as an example. It looks and feels like you are flying an airplane, but you are completely disconnected from the reality of flying the plane, and you can bend or break those rules as you see fit. E.g.; Fly an Airbus A380 upside down between London and Sydney without breaking it.
An emulation is a system that behaves exactly like something else, and abides by all of the rules of the system being emulated. It is effectively a complete replication of another system, right down to being binary compatible with the emulated system's inputs and outputs, but operating in a different environment to the environment of the original emulated system. The rules are fixed, and cannot be changed or the system fails.
The M.A.M.E. system is built around this very premise. All those old arcade systems that have been long forgotten, that were implemented almost entirely in hardware, or in the firmware of their hardware systems can be emulated right down to the original bugs and crashes that would occur when you reached the highest possible score.

Running your application on a real device
When an Android device is connected to the computer with a USB cable, the Eclipse ADT plug-in automatically recognizes the Android device and attempts to deploy applications onto it.
Now installing ADT….
ADT Plugin
First install ADT bundle which also has SDK manager.So,the SDK location gets automatically populated

Android Development Tools (ADT) is a plugin for the Eclipse IDE that is designed to give you a powerful, integrated environment in which to build Android applications
ADT extends the capabilities of Eclipse to let you quickly set up new Android projects, create an application UI, add packages based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) .apk files in order to distribute your application.

Install Google USB driver by following the REF: http://developer.android.com/sdk/win-usb.html
Once the Android environment is set,below error may occur.Hence set the Project Build Target

Once all the errors are resolved in the native Android project,create .apk file if it is not created automatically.
Android application package file (APK) is the file format used to distribute and install application software and middleware onto Google's Android operating system.APK files are ZIP file formatted packages based on the JAR file format, with .apk file extensions
Create by choosing as below

Password used is “passwd”

Now send this .apk file saved in your PC to your Android mobile.While trying to open the .apk file in Android mobile,it will ask you with Android symbol to install.Say yes and that’s it …
All set!
You can see the application name with some icon in your modile and you can open to view the Application.

REF:

1 comment:

  1. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in ibm worklight, kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on ibm worklight. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.
    For Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete