App Development For Android On Android In Four Steps

Want to support HowtoForge? Become a subscriber!
 
Submitted by jtzero (Contact Author) (Forums) on Wed, 2012-06-27 20:06. :: Android

App Development For Android On Android In Four Steps

This guide gives you a quick insight into creating Android apps directly on an Android device. This short article is not meant as a full documentation, but rather guides you in the right direction so that you should get the idea. There are a lot of app howto's for Android on Eclipse, but none for on Android, so here's the skinny.

1. Get AIDE. It can be downloaded from the Play™ store. There are others but this one is great.

2. Open up AIDE and it will ask to create a new project.

AppName: HelloWorld

PackageName: com.howtoforge

3. Paste in the following:

package com.HelloWorld;
import android.app.*;
import android.os.*;
import android.view.*;
import android.widget.*;
public class MainActivity extends Activity
{
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState)
	{
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);
		TextView text = new TextView(this);
		text.setText("Hello World, Android"); 
		setContentView(text);
    }
	
}

4. Click the 3 dots in the top right and hit run.

It may ask you to allow installation from unknown sources.

Done! And you can check it from the installed apps lists.

Written from the same Android that created the projec.

jtzero


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Sat, 2012-09-01 20:12.

the  package name in the code "com.HelloWorld" should be changed to "com.howtoforge".

 

Submitted by Anonymous (not registered) on Wed, 2013-01-09 11:43.
Agree ... com.howtoforge.HelloWorld