Featured Post

J2ME Andrioid application development steps

Hi Guys,

Today We are going to discuss on j2me application design on Android phones . Before going to the steps I just want to give you more information about Andriod . This is OS developed by google which can run java based applications but need a plug in to convert the jar file to apk file which is compatible with Android phones . Please go through below mentioned book which is really good . I am currently using this book to develop Android Applications .


Eclipse will support plugins for Android so you can choose either Netbeans or Eclipse which ever you feel better . But currently I am using Netbeans which bit easy to develop applications on Android .



Sample code will be look like this .

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package org.me.myandroid;

import android.app.Activity;
import android.os.Bundle;
import android.widget.CheckBox;
import android.widget.TextView;

/**
*
* @author VENKAT
*/
Steps to be followed to setup Android Plugin in Eclipse

1) # Android plugins for NetBeans: The Android plugins are now called 'nbandroid' and being developed http://nbandroid.kenai.com. Earlier, the project was called 'undrioid': http://undroid.nolimit.cz
2)Download and install NBMs. Those are available for download from here. Once downloaded, install all the plugins by going to Tools > Plugins > Downloaded.
3) Adding the Android platform
After you have installed the plugins,you have to add your Android platform by going to Tools->Java Platforms:
4)Select the downloaded sdk and click next
5)If you get below error that means sdk is not installed properly better use Android tool to download the entire sdk
If you're having error "A platform target has to be selected"
6)file -> new project there you could see Android select that
some project files will be created in your project dwirectory

generated code will be look like this .

public class MainActivity extends Activity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
CheckBox cb=new CheckBox(this);
cb.setAutoLinkMask(RESULT_OK);
setContentView(cb);
//setContentView(tv);
}

}



and build the project and run . If you haven't added the emulator then you can add emulator using below command .

~/path/to/sdk$ android create avd -n avd_1.5_1 -t 2

and yous build.xml should be look like this



... truncated ...







ANDROID



P.S: In the Next posting you will find the procedure to setup in eclipse .











Enter you DOB ,Time and Place

Comments

Popular posts from this blog

[Inside AdSense] Understanding your eCPM (effective cost per thousand impress...