Sunday, 16 February 2014

Some different ways to develop application in Android/Mobile

In present, Android is the most popular mobile os in the world and many people wanted to learning to make applications in this os. And today, I will introduce some ways to develop application in Android (and some way to develop cross-platform mobile os).


Eclipse + Android development tools (ADT)

With a single download from http://developer.android.com/sdk/index.html (current, when android studio isn't final version), the ADT Bundle includes everything need to begin developing apps:
  • Eclipse + ADT plugin
  • Android SDK Tools
  • Android Platform-tools
  • The latest Android platform
  • The latest Android system image for the emulator
This is the main software development kit (SDK) of Google for develop Android apps.

Characteristic

  • Main kit will full feature.
  • Easy to search solutions because almost Android developer use it.
  • Ram: about 500 mb.
  • Not really stable.
  • In my personal view, I don't like eclipse: ugly and not stable.


Android studio
Download: http://developer.android.com/sdk/installing/studio.html
Android Studio is a new Android development environment based on IntelliJ IDEA developed by Google. Similar to Eclipse with the ADT Plugin. You can think it is new generation of Eclipse with ADT.
But:
Android Studio is currently available as an early access preview. Several features are either incomplete or not yet implemented and you may encounter bugs.
 
Characteristic
  • Like eclipse but having some differences.
  • Ram: about 400 mb (lighter) but start up slower.
  • Still test version.
  • More comfortable and intelligent.
  • When use eclipse project, need export from eclipse, can't use direct.

Android studio having some advanced that I very like:

Show hint first code of block when block code too long and can't see in screen, and Indent Guideline (like in notepad++)

Android studio hint first code of block tientuts

Autocomplete more intelligent like with android studio in xml, when you type a , it will show android: , we only need tab and type other word. But in eclipse, we need type full android: to autocomplete property of tab.
Android studio tientus autocomplete

We can show multi-screen, multi-language and multi-device in Android studio.

Android studio multi-screen and multi-language tientuts

Android studio view with different devices tientuts



PhoneGap (Cross-platform)
Homepage:http://phonegap.com/
PhoneGap is a mobile development framework produced by Nitobi, purchased by Adobe Systems.

In the easiest way, you can know that coding in phonegap is coding web mobile, phonegap supply some function to javascript can interact with system, show in bellow.


And after coding web, we need code only few code lines and import library of phonegap like in red arrows. And to call Phonegap APIs from javascript, in web code (blue arrow) we need use cordova.js library.
Phonegap code tientuts


This is a demo application:
MDS Phonegap API demo
Phonegap provides online service for wrap web code to many mobile platform without need make manual like eclipse code above.


Titanium (Cross-platform)
 Like Phonegap but we can easy recognition titanium apps different with phonegap apps that, titanium have UI like application be created by eclipse, android studio. 
Titanium application tientuts
when we use javascript code like:
b = Ti.UI.createButton({title:'Poke Me'});
It will convert to java code (in Android), and so it can use more functions of Android os but it will not as compatible as Phonegap.