Your own Android app: A simple introduction for developers.

0

Mobile gaming is becoming more and more interesting. You can download games to your mobile or smartphone to play on the run. The iPhone may have been the pioneer in this field but Apple isn’t the only player in the market anymore.

Text: by Dominik Lewalter; Photos: SAE Cologne, Sebastian Schillack

Google’s operating system Android recorded enormous growth of over 800 % in 2010 and is currently holding second place for mobile phone operating systems. Symbia is currently in first place but Google is predicted to take pole position as early as next year (source: www.gartner.com). This should ensure a future for the Android market.
The great thing about Android apps is that all required development software can be downloaded from the Internet free of charge. Applications can then be easily tested using either an emulator or your own smartphone. You only need to apply for a Google Developer Account (for a small fee) when your game or application is ready and you want to put it on the Android Market.

Create a new project and choose the desired Android version

Create a new project and choose the desired Android version

So what exactly do you need to start developing? Android programming is done in Java so the current Java JDK is required. The standard edition is sufficient for our purposes. Eclipse is our preferred development environment and finally theAndroid SDK is required. After Java and Eclipse have been installed you will need to configure the development environment.

1. Use the Eclipse plug-in for Android. Click on “Help” >“Install New Software” and then on “Add” on the top right of the dialogue box which appears. Here, enter https:// dl-ssl.google.com/android/eclipse as a source and install the plug-ins available.
2. If you haven’t already done so, now install the Android SDK.
3. Next, enter the location of the Android SDK. In Eclipse click on “Window” > “Preferences” and on “Android” in the left column. Enter the path where the SDK is installed.
4. Finally, install an emulator. In Eclipse click on “Window” > “Android SDK and AVD Manager”. Click on “New” in the top right and enter the parameters for the emulator. Generally the default settings are sufficient but you will however need to check which version of the API is entered as target, this should of course correspond to the version with which you are developing.
Now you have everything needed to start an Android project using Eclipse, but before you really get going have a quick look at how an Android app actually works. Apps are fundamentally composed of various separate components which can be joined together to form an app. There are four types of components:

Dominik Lewalter, programmer and Head Instructor Interactive Entertainment  SAE / Qantm Cologne.

Dominik Lewalter, programmer and Head Instructor Interactive Entertainment
SAE / Qantm Cologne.

An “Activity” is the most important component. Activities control the user interface and everything to do with graphics and user inputs. Only one activity can be active at anytime, each action calls a new activity.
“Services” predominantly run in the background. Services can be used to implement background calculations or provide other apps with data.
“Content providers” primarily communicate with other apps and enable these to access certain data. The content provider interface is used to precisely define which app may receive what data.
“Broadcast receivers” are used to provide information when a particular event occurs on the phone, for example when a USB cable is connected or when the battery is nearly empty.

Downloads and information
The Java JDK can be downloaded directly from Oracle, the SE version is sufficient (http://www.oracle.com/technetwork/java/javase/downloads). Eclipse can be found at http://www.eclipse.org/downloads/, the current version of the classic version is sufficient. The Android SDK and detailed documentation are found at http://developer.android.com.

 

Share.

Leave A Reply