PocketMagic

PocketMagic

Where Technology meets magic


Android
45 Posts
BlackBerry
4 Posts
Electronics
68 Posts
Hardware
120 Posts
High Voltage
49 Posts
iPhone
4 Posts
Linux
2 Posts
Nuclear
20 Posts
Optics
11 Posts
Photography
7 Posts
Photoshop
3 Posts
Research
19 Posts
Reviews
18 Posts
Robotics
8 Posts
Security
7 Posts
Software
73 Posts
Symbian
2 Posts
Tubes
18 Posts
Windows
3 Posts
Windows Mobile
11 Posts

Top Articles!       See PocketMagic on Facebook


uRADMonitor - Online Radiation monitoring station | 14812 Views | Rate 70.53
uRADMonitor - Online Radiation monitoring station
Developing for Blackberry 10 | 60 Views | Rate 60
Developing for Blackberry 10
Bluetooth and iOS - Use Bluetooth in your iPhone apps | 17782 Views | Rate 57.92
Bluetooth and iOS - Use Bluetooth in your iPhone apps
NMEA GPS Library for AVR Microcontrollers | 4780 Views | Rate 57.59
NMEA GPS Library for AVR Microcontrollers
Building a robot – Part 2 | 4531 Views | Rate 44.42
Building a robot – Part 2
Programmatically Injecting Events on Android - Part 2 | 4869 Views | Rate 44.26
Programmatically Injecting Events on Android - Part 2
Simple Switched power Supplies | 15898 Views | Rate 41.51
Simple Switched power Supplies
Capacitor Discharge Microspot Welder / Cutter | 11175 Views | Rate 36.17
Capacitor Discharge Microspot Welder / Cutter

 
  

Developing for Google Android – the SDK


By Radu Motisan Posted on May 12th, 2009 , 1175 Views (Rate 0.8)



  




Update Jan 2011: see new article

Following the recent posts on the Google Android platform, I thought it is time to go a little deeper in the programming world of this mobile device.

So the questions is:
- What do we need to start coding for Google Android?

Lucky for us, there are lots of tools available online, and the Android team has provided a comprehensive guide on this. You can read it here.

In just a few words:
1. you will be needing Eclipse, get it here. I'm currently using (actually I'm currently having installed, since I've moved to native C/C++ Android development), Eclipse IDE for Java EE Developers (163 MB) , jee-ganymede-SR2. Download it and install it.
2. the Google Android SDK, get it here . Current version at this time is 1.5.r1. To install the SDK you simply need to unzip it to a location on your PC. You will have a folder named android-sdk-windows-1.5_r1, and inside several subfolders (add-ons, docs, platforms, tools, usb_driver). Keep this structure intact.
3. Open Eclipse (start eclipse.exe from the installation folder), and go to menu, Help->Software Updates->Available Software->Add Site. Type in this address: http://dl-ssl.google.com/android/eclipse/, and press OK. Click the newly added check boxes and press Install. On the following Install window, "Android DDMS" and "Android Development Tools" must both be checked. Click Next/Accept/Finish and restart Eclipse when prompt to do so.





4. Add the SDK to Eclipse. Again in Eclipse menu, Click Window->Preferences->Android and browse to the location of the SDK folder you've unzipped earlier. Then click apply / ok.

First Android application
A good idea for a start is to try to compile one of the SDK samples. Android SDK comes with several samples developed in JAVA. Let's see how we can get one running.
1. Open Eclipse, go to menu File -> New ->Project , select Android Project and click next. Now give it a name, eg. TestHello, and select "Create project from existing source", and browse to %SDK_PATH%/platforms/android-1.5/samples select HelloActivity folder and click OK. You should get the source code imported.

2. Go to Menu Project -> uncheck Build automatically. Now you can right click your project name in the project explorer and select Build Project.
3. Go to \android-sdk-windows-1.5_r1\platforms\android-1.5\samples\HelloActivity\bin\ and locate TestHello.apk . This is the installer for your newly compiled app.
4. Using adb, from SDK tools, install the application:
adb install TestHello.apk
Next you can locate it in Android programs , and execute it with a simple tap.

Next you can modify the code, and learn new things. Hope you find this start-up useful.






  

More on PocketMagic:

Programmatically Injecting Events on Android - Part 1 | 10002 Views | Rate 25.91
Programmatically Injecting Events on Android - Part 1
Atmega8 and enc28J60 for ethernet support | 7132 Views | Rate 24.34
Atmega8 and enc28J60 for ethernet support
Victoreen CDV-717 Remote Gamma Survey dosimeter | 97 Views | Rate 24.25
Victoreen CDV-717 Remote Gamma Survey dosimeter
CDV-742 Dosimeter and CDV-750 Dosimeter Charger | 96 Views | Rate 24
CDV-742 Dosimeter and CDV-750 Dosimeter Charger
How to set the AVR Fusebits | 1652 Views | Rate 23.6
How to set the AVR Fusebits
ATMega128 and HD44780 LCD using 3 Wires with the 74HC164 | 2010 Views | Rate 22.84
ATMega128 and HD44780 LCD using 3 Wires with the 74HC164

3 Responses to “Developing for Google Android – the SDK”

  1. 1
    Seamus Gilchrist:

    Hi,

    i have not seen much on C/C++ access to the Android – does this level of programming allow access to the media stream itself? Can i control the call termination and voice processing from the API – for example, if i wanted to pipe the voice out of a port, is that possible to control?

    thanks,

    Seamus

  2. 2
    PocketMagic » Developing for Android – the SDK – update 2011:

    [...] lot has changed in the tools used to develop for Android since my last article on this topic. The previous article, back in 2009 has shown a basic guide to get you going. Here's an [...]

  3. 3
    JohnYeo:

    I get a message saying that “File AndroidManifest.xml not found in xxxx” when I’m compiling old source code. Any ideas how to solve this?

Thank you for commenting. Your comment won't show until approved, which can take some time.

Please copy the string F7fbEI to the field below: