Welcome to the Linux Foundation Forum!

Android Development

Good or bad experiences developing apps lately? What are you learning about the dev process?


  • Goineasy9
    Goineasy9 Posts: 1,114
    I myself just started setting up a development environment for Android. This will be a great place to share the knowledge. Thanks Jennifer.
  • mfillpot
    mfillpot Posts: 2,177
    I have been playing with android development on and off over the past several month, I still consider java awkward so nothing has been completed or submitted. But now that we have this section I have a place to go for help or to voice my java frustrations, so thank you very much for adding this section.
  • ben
    ben Posts: 134
    As you may know I've received a Nexus One device in April, I've installed the complete toolchain and adapted my eclipse environment to the Google SDK during the collaboration summit days. After the common "hello world" program I've had a lot of troubles dealing with tons of different java objects / classes in the early days due to my lack of knowledge.
    Now after 7-8 months spent on it I'm quite happy of the environment, personal knowledge and java basic classes.
    You need to understand deeply their java classes, you can solve the same problem using different classes and use different solutions.
    The key point of Android OS is basically the developing environment from my point of view. You can literally redesign the user interface by subclassing Google basic classes, redesign the home menu, items, telephone app, contacts and so on.

    You need to understand their structure and APIs and when you design an embedded app for your phone/pda/... application performances and speed are really impressive (even if Snapdragon CPUs are crunching beasts compared to others...), you can design your app with an embedded browser, map, high level objects and so on. It takes a while to learn everything but when you've read few books and understand basic concepts (from forums for example) it's easy to develop for it.
    Now I've some experience on the OS and the Java environment, I'm really happy to discuss some advanced topics with you if possible, even write articles or blogs if this is an interesting topic

  • Goineasy9
    Goineasy9 Posts: 1,114
    It's nice to see that you've chosen Eclipse with the Android plugin, that's how I've decided to set up development. I've had to put the set up on hold, unless I find a separate computer to run it on. Seems like a fix made to the Fedora Eclipse requires an update to a version of OpenJDK that borks some financial software I use. Hopefully they'll fix OpenJDK soon and I can join the fun.
  • ben
    ben Posts: 134
    I use Eclipse for everything I've related to development (C++, Java, C with AVR GCC, Python, Php, JS, ...) so my opinion could may be a little bit influenced from the experience.
    Google suggest you to use Eclipse and most of their documentation is related to it.

    I personally don't install Eclipse from distribution repository (rpm -ivh ... Fedora, apt-get install ... debian, emerge ... gentoo) 'cause Eclipse is a "different beast" and has its own updates, even on heavily updated distro (Fedora or Ubuntu for example) you don't have the same features or updates from original Eclipse repository. So I've always installed Eclipse on its own from their website.

    Never had a trouble with an underlying JVM but I personally don't use Fedora; mainly Gentoo, Slack, Debian and Ubuntu.

    I'm glad to find someone else using droid tools from this site, I'll look forward for exchanging experiences on it.

  • Goineasy9
    Goineasy9 Posts: 1,114
    I finally got some time to set up one of my machines for the Android development environment, and I'm a bit confused. When I started reading up a few weeks ago, I was under the impression that I could use OpenJDK as the Java component, but, when I got to the installation requirements I see this:

    Supported Development Environments
    Eclipse IDE

    Eclipse 3.4 (Ganymede) or greater
    Eclipse JDT plugin (included in most Eclipse IDE packages)
    If you need to install or update Eclipse, you can download it from http://www.eclipse.org/downloads/.
    Several types of Eclipse packages are available for each platform. For developing Android applications, we recommend that you install one of these packages:
    Eclipse IDE for Java Developers
    Eclipse Classic (versions 3.5.1 and higher)
    Eclipse IDE for Java EE Developers
    JDK 5 or JDK 6 (JRE alone is not sufficient)
    Android Development Tools plugin (recommended)
    Not compatible with Gnu Compiler for Java (gcj)

    The last 3 lines seem to me to say that one needs Oracle/Sun Java JDK. Can anyone confirm this for me? I was hoping to stay Open Source.
  • Goineasy9
    Goineasy9 Posts: 1,114
    Thanks Matt going to try that as soon as I get home.
  • ben
    ben Posts: 134
    I also suggest this one (http://developer.android.com/guide/developing/eclipse-adt.html)

    When I usually develop something with a tool I search something from the web as an alternative to manufacturer/producer source documentation; believe me or not Google did an impressive job with their docs, you can find a lot of different sources but official documentation is really clear and verbose, take a look at it.

    To answer your question here's what I'm using in my Ubuntu laptop:

    ben@andrea:/$ aptitude search jdk
    p default-jdk - Standard Java or Java compatible Developme
    v default-jdk-builddep -
    p default-jdk-doc - Standard Java or Java compatible Developme
    p gcj-4.4-jdk - gcj and classpath development tools for Ja
    p gcj-4.5-jdk - gcj and classpath development tools for Ja
    p gcj-jdk - gcj and classpath development tools for Ja
    p openjdk-6-dbg - Java runtime based on OpenJDK (debugging s
    p openjdk-6-demo - Java runtime based on OpenJDK (demos and e
    p openjdk-6-doc - OpenJDK Development Kit (JDK) documentatio
    p openjdk-6-jdk - OpenJDK Development Kit (JDK)
    i A openjdk-6-jre - OpenJDK Java runtime, using Hotspot JIT
    i A openjdk-6-jre-headless - OpenJDK Java runtime, using Hotspot JIT (h
    i A openjdk-6-jre-lib - OpenJDK Java runtime (architecture indepen
    v openjdk-6-jre-shark -
    p openjdk-6-jre-zero - Alternative JVM for OpenJDK, using Zero/Sh
    p openjdk-6-source - OpenJDK Development Kit (JDK) source files

    As you can see I'm using openjdk, I've installed it directly from repository but I've manually downloaded Eclipse from eclipse.org site, no Ubuntu/Debian repository involved with it. I'm using Eclipse for 5/6 years and I've always avoided to install it from any distribution repository, that's because I'd like to update it manually from eclipse site and have more features/modules available.
    Let me know about your tests if you need help with it

  • Goineasy9
    Goineasy9 Posts: 1,114
    BTW - Since I'm still new to android-sdk, I don't know if this is news or not, but, from reading a few how-to's, it seems like the directions have changed. Android-sdk no longer downloads with adb, one must cd into the android-sdk-linux_86 folder in terminal and execute "tools/android update sdk" in order to download adb and other parts of the android-sdk.

    So, from step three of the original link I gave:

    3.) Change Directory into the "platform-tools" directory, then copy the "adb" application to your Ubuntu /usr/bin directory (sudo privs needed)
    #From the extracted "android-sdk-linux_86" directory:
    cd platform-tools
    sudo cp adb /usr/bin/adb

    it must be changed to:

    3.) Change Directory into the "platform-tools" directory, then copy the "adb" application to your Ubuntu /usr/bin directory (sudo privs needed)
    #From the extracted "android-sdk-linux_86" directory:
    tools/android update sdk
    cd platform-tools
    sudo cp adb /usr/bin/adb
  • ben
    ben Posts: 134
    Are you able to compile your first hello world program now ?
  • Goineasy9
    Goineasy9 Posts: 1,114
    No, not yet, got caught up with holidays and other projects, may try again this weekend. I've also been waiting for an update for OpenJDK that's coming from upstream, been waiting a month and a half, or else I have to install Oracle's Java.
  • shreya.pandey
    shreya.pandey Posts: 2
    edited September 2017

    Me and my friend had an awesome phone app idea at the weekend, I thought I'd try my hand at developing an Android application this week.

    I want to give a quick overview of my preliminary thoughts on getting started on this endeavour. 

    Background: I've got more than 10 years Java experience, but any UI for the applications I've worked on was always a web UI.  I am completely new to mobile app develop.

    I spent maybe a day and a half watching the excellent Android development tutorials and attempting to hack out a quick 'droid app.

    I remember the disaster of trying to get my first JDK working on my 486 - what a nightmare!  And getting Tomcat 3 installed and running?  Forget it.  I also remember the last time I made a serious stab at a learning a new technology.  I tried develop a Grails/Groovy application in Eclipse.  The IS guys had to rescue my laptop from me during that enterprise before I could do it any serious damage.

    Installing the SDK on my mac was surprisingly simple, especially bearing in mind I'm new both to OSX and to mobile development.  I don't know if it's because Android development has been well thought out and well supported, or if it's a function of both the industry's maturity and my own experience.

    The integration with IntelliJ was much slicker than I expected, especially since I'm using the freebie Community edition.  I don't remember the exact steps to tell it I wanted to create an Android project, but it must have been ridiculously easy otherwise I would remember the trauma.  I do remember a little confusion around installing the Android platform - I hadn't understood the difference between installing the SDK and then installing a specific API for it. And then when I clicked the "run" button in IntelliJ, hey presto!  The emulator appeared and there was my app!

    Did it work?


    I managed to get a rudimentary application running, with a button and some descriptive text (it's not about to win any awards).  The button was supposed to launch the camera viewer, but my first few attempts just resulted in the crash notification.  It didn't take long to figure out how to use logcat to see the stack trace and see I hadn't set the permissions correctly to use the camera, so I rooted through the CameraDemo example in APIDemo to figure out how to set up the AndroidManifest.xml correctly, and rather amazingly it all worked!




  • extemporal
    extemporal Posts: 1
    edited November 2017

    I have a need to port a very simple console-only C language program to Android.

    I assume there is a simple "terminal" application for Android this could use. Any recommandations?

    The program is used on a single device only, so I would prefer to compile a binary for the particular processor instead of porting the whole thing to Java.  

    All comments on the practicality of this undertaking are welcomed.



Upcoming Training