wood burning stoves 2.0
The moose likes Android and the fly likes Developing and Testing Android application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Developing and Testing Android application" Watch "Developing and Testing Android application" New topic

Developing and Testing Android application

Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
I am a Java Developer and want to learn Android. Please share some starting steps that can also teach me some with some hands-on examples.

Also, how do I test my application, is there some IDE / simulator available. Can I test my application on actual HTC handset that has android on it. Is it safe for a newbie to test application on android.


Pramod P Deore
Ranch Hand

Joined: Jul 15, 2008
Posts: 632

You can download Android SDK from here.

Life is easy because we write the source code.....
Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
Can someone please reply with some more details.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
What specifically are you looking for that is not covered by the extensive SDK documentation?

The SDK includes an emulator.

You can test apps on your own devices.

Define "safe". For example, if you write an app that deletes files from the SD card, and it doesn't work right, then all your files may be lost.
Christian Chabtini

Joined: Jul 21, 2008
Posts: 5
I am also a new to Android... but you could check their samples. They have code samples as well as documentation for each sample. I found those very useful and exposes many libraries and techniques to help you start programming in android.
I used the sdk in eclipse. and the projects were really easy to run.

Thank you, Christian Chabtini
Software Engineer, EMIDA
robi sen
Ranch Hand

Joined: Jan 25, 2011
Posts: 33
Great questions especially about testing. First you can go to http://developer.android.com/index.html and download the SDK and if you use Eclipse you can also the ADT plugin for Eclipse which greatly helps in development. There are also numerous examples at the site to help you get started. Or you could by Android in Action which walks you through getting setup, started, and developing real applications.
Now as for testing there are many different forms of testing as well as things like quality assurance. For the most basic forms of testing, unit testing (via JUNIT), the Android ATP plugin for Eclipse has this built in so that you can exercise any application you develop. You can also use Android’s Emulator which comes with the SDK. The Emulator allows you to run virtual instances of Android so that you can test and debug your applications before you put them on a phone. Also you can put your application on your phone and test with little fear as long as you are not using the API to do things like delete files, change system settings, and the like. Generally if you get to that stage you want hardware you can test on that you do not mind if you accidentally overwrite all your contacts and such. Android also supports functional testing via JUNIT and others have integrated different testing frameworks with Android. Thus you can lets say have a database with various test data and then have your tests pull that data and exercise your application to perform functional testing. Furthermore you can use tools like Hudson, Maven, Ant etc to integrate with the SDK and Emulator and even, automatically on a build server, kick of builds and tests in a continuous integration development environment to maintain quality in larger projects. In the case of testing security you can even integrate tools like Sulley to automatically perform fuzzing of applications or Android. As such more or less anything you want to do in the form of testing you can do on Android either in the emulator, or on a handset, and automate it to your hearts content.
Does that help?
Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
Thanks for very useful explanation.
Keith Flo
Ranch Hand

Joined: Nov 29, 2005
Posts: 128

I'm curious about how you develop UIs in Android Apps?

Some have said that since there is no 'visual designer' for Android developing your UI can be rather tedious. Can you tell me ...
  • Is this your experience too?
  • What do you use to develop your UIs?
  • Is there a tool/tools you recommend for building UIs?
  • Didn't Google recently acquire a vendor who makes Android UI tools?

  • PS: Just bought your book, from what I've read so far (a few pages in the bookstore) ... I like it ...
    I've never done any Android development but I know Windows Phone 7 has Visual Studio AND Expression Blend for rich, drag & drop UI building .... XCode has Interface Builder ... Andoid need something ... I think

    SCJP 5.0 (preparing for SCWCD)
    Ulf Dittmer

    Joined: Mar 22, 2005
    Posts: 42965
    Keith Flo wrote:I'm curious about how you develop UIs in Android Apps?

    One option is DroidDraw.
    Dushyant Chhetri
    Ranch Hand

    Joined: Oct 28, 2009
    Posts: 75
    Try these:

    I agree. Here's the link: http://aspose.com/file-tools
    subject: Developing and Testing Android application
    It's not a secret anymore!