(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==PAGE IN PROGRESS==
+
[[Category:how to]]
 +
[[Category:Android]]
 +
[[Category:tutorial]]
  
=Coding for Android on Windows=
+
<center><font size= 3>
This page shall help you to get started to write applications for an Android phone, using [http://www.eclipse.org/ Eclipse] with the [http://developer.android.com/sdk/index.html Android SDK] and [http://developer.android.com/sdk/ndk/index.html NDK].
+
''' Coding for Android on Windows'''
  
 +
by  [[User:Ctendyck|Christian Tendyck]]
 +
</font size>
 +
</center>
 +
----
 +
This page shall help you to get started to write applications for an Android phone, using [http://www.eclipse.org/ Eclipse] with the [http://developer.android.com/sdk/index.html Android SDK] and [http://developer.android.com/sdk/ndk/index.html NDK] in general. The last two parts of this page are more related to my current work in the research lab and shows you how to do image processing on an Android phone.<br />
 +
I have devided this page in several subpages. So it is easier to write comments to special topics and this page doesn't get to messy. The topics are:
 +
# [[Coding_for_Android_on_Windows_-_Set_up_your_machine|Set up your machine and create a virtual device]]
 +
# [[Coding_for_Android_on_Windows_-_First_projects|First project and the NDK]]
 +
# [[Coding_for_Android_on_Windows_-_Image_processing_-_Java_Code|Image processing on an Android phone - Java Code]]
 +
# [[Coding_for_Android_on_Windows_-_Image_processing_-_C_Code|Image processing on an Android phone - C++ Code]]
  
 
+
Feel free to write comments or add content.
==About me==
+
----
<table> <tr>
+
<td width="500px">My name is Christian Tendyck. I am an exchange student from Germany and I am at Purdue for one year, fall 2011 to spring 2012. In Germany I have finished my Bachelor in June 2011 and now I am a Master student. I am working as a research assistant for Professor Mireille “Mimi” Boutin in the field of Image Processing and my job is to code an application for an Android phone within these two semesters.<br />
+
In Germany I took undergraduate courses in '''Java''' and '''C''' Programming. But as it was already three years ago, I first of all had to get used to everything again when started my research here at Purdue. So if you are not the best software engineer but want to learn how to get started with coding for Android, just keep on reading.<br />
+
On this page I want to share with you my experiences on programming for Android, my obstacles and solutions and show how to create an application from scratch.</td>
+
<td>[[Image:Rhea_Christian.JPG|right|300px]]</td>
+
</tr></table>
+
 
+
 
+
==Set up your machine==
+
Before you can start coding, you have to download and install a few programs. First of all there is [http://www.eclipse.org/ Eclipse]. If you are used to Java, you will probably know how to use Eclipse. Furthermore you need to download the [http://developer.android.com/sdk/index.html Android SDK and ADT]. The [http://developer.android.com/sdk/ndk/index.html NDK] is just needed if you are planing to use native code. That means to write a part of your program in C or C++ or to use C-libraries. Then you also have to install the C/C++ Development tool for eclipse. You do this via "help/install new software" in eclise. Follow the instructions on [http://eclipse.org/cdt/downloads.php this site]. To compile C code in eclipse, you need another tool called [http://cygwin.com/ Cygwin]. With Cygwin you can emulate some kind of a Linux console. This is the only way I know to compile C-Code in Eclipse on a Windows machine. Some really common standard C++ libraries cannot be used when compiling with the NDK. But there is a modified version of it called [http://www.crystax.net/de/android/ndk Crystax] that allows you to use these libraries.
+
 
+
 
+
==Create a virtual device==
+
If you do not have an Android phone on your own or if you do not want to upload your apps on your phone everytime to check if your code is working, you can create a virtual device. A virtual device is an emulator of an Android phone. It is very easy to create it. I assume you have already installed the Android SDK. Start Eclipse and click on "Window/Android SDK and AVD Manager". Install the packages you need. That means, download the package with the correct plattform version you want to code for. Then, click "virtual device/new". Choose a name and a target and if you want to, you can also create a virtual SD Card. This is very helpful if you are planing to use the SD Card on your real phone as well. Eclipse will create a file "sdcard.img" that is as big as you have chosen it to be. To mount it as a virtual hard disk, you need a program like [http://www.ltr-data.se/opencode.html/#ImDisk ImDisk Virtual Disk Driver]. You can create folders on your virtual SD card and use it as any other SD Card.
+
 
+
 
+
==Hello World on Android==
+
As usual, your first program on Android can/should be a Hello World. It is just as easy as it is when not coding for Android.
+
 
+
 
+
 
+
 
+
 
+
==PAGE IN PROGRESS==
+

Latest revision as of 10:03, 21 May 2013


Coding for Android on Windows

by Christian Tendyck


This page shall help you to get started to write applications for an Android phone, using Eclipse with the Android SDK and NDK in general. The last two parts of this page are more related to my current work in the research lab and shows you how to do image processing on an Android phone.
I have devided this page in several subpages. So it is easier to write comments to special topics and this page doesn't get to messy. The topics are:

  1. Set up your machine and create a virtual device
  2. First project and the NDK
  3. Image processing on an Android phone - Java Code
  4. Image processing on an Android phone - C++ Code

Feel free to write comments or add content.


Alumni Liaison

has a message for current ECE438 students.

Sean Hu, ECE PhD 2009