Skip to content
fx-adi-lima edited this page Feb 23, 2017 · 5 revisions

About This Site

This is my personal repository on [GitHub!](https://github.com/], which actually holding a series of ideas on how to use Java classes and handling projects to build apps for Android, in particular is for Android-x86, which I personally use for Android programming host (along with other systems).
If you interested on Android-x86, I suggest you visit their site! and learn more about it. It's a very interesting project, at least for me, because it's allow me to use Android OS on most x86 based computer, including the one I use to write this page right now.
But discussions around android-x86 is not the focus of this page, this repository was dedicated for android programming and tutorials. The script I use all the way through this tutorials is especially written for used with android-x86, but actually it can be used with other Linux system too, with some modifications, in particular the hardcoded path into /system/bin/sh and many other core components there.
For Windows users, I guess you can use my build.bat to automate the build. I guess you may need to adjust the path for %JAVA_HOME% and %ANDROID_HOME% and probably the version of android SDK that you want to support in your projects.
This simple script is greatly simplify our tutorials, so that you don't have to make projects again and again, it took so much space on your hard drive.
For example, let's say we wanted to make a Hello World program as a starting point, with only a TextView just to show a "Hello World" text inside, all you need is something like this:

package com.yourname.yourproject;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView; 

public class Main extend Activity {
    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        TextView tv = new TextView(this);
        tv.setTextSize(30);
        tv.setText("Hello World");
        setContentView(tv);
    }
}

And a simple AndroidManifest.xml file to describe your application (you can copy it from anywhere in the repository, but please change the package name and the name of the test application). Use build.sh or build.bat in this repository to compile it, and it will give you a signed APK in the current directory.
If using android-x86 to build the project, then you can simple copy it somewhere that the Package Installer have proper permissions to install packages, say in your Download folder. You will have to enable Allow installation from non-market applications in system settings. It's okay, because you will only install/uninstall your very own applications.

Clone this wiki locally