Category: Java Development

  • Proguard for Android with Maven without shooting yourself in the foot

    So with the introduction with the Android License Validation Library and now with the SDK tools revision 8 and the integrated options, Proguard has gained more and more interest in the Android developer community and users of the Android Maven Plugin are certainly not left behind. Of course Proguard is a fairly powerful tool that overs plenty of opportunity to get yourself into trouble or long debugging sessions. With this post I am going to show you how to best set up proguard usage in your Maven based Android application build. So lets get started.
    (more…)

  • Reviving ksoap2 for Android

    If you are developing Android applications that need to interface with SOAP web services, you probably know that the Android SDK does not have any support for this technology. It is somewhat considered legacy, but it is still widely used in many enterprise applications. When you look around for a SOAP library that is suitable for mobile devices in the sense that it is not too heavy you will inevitable find ksoap, which has a history on J2ME and Blackberry. Unfortunately the project has been pretty much dead for a long time now.
    (more…)

  • Referential integrity with sqlite on Android the lazy way

    AndroidAs you all know the main supported persistence mechanism on Android is storing data in the extremely widespread embedded database SQLite. Now when you look around various books and documentation, the examples you get are most of the time are pretty trivial. When you then come from a background of full on relational database management systems like PostgreSQL, working with SQLite with have a few surprises to you. One of those surprises is that referential integrity is not a standard feature unless you have some tricks up your sleave.. (more…)

  • Automatically starting the emulator in your Android build

    In the beginning writing apps for Android is easy. Then the usual things creep in. You start getting beyond Hello World examples and answers on mailing list, you begin refactoring code and features and you really need to make sure it runs on all platforms. Luckily there are helpers around. For the testing side of things the whole test suite around instrumentation tests is really great (although I wish they used testng and not junit as the base) and now this is finally really well documentation on the site and not just in the samples code somewhere. However if you really want to use these you have to run your build against a device or an emulator (or better both). And thats where the Maven Android Plugin comes in handy.
    (more…)

  • Attribute support for KSOAP2 on Android

    So recently I have been doing a lot of Android development and generally having a great time. In general the Android API is very complete and offeres support for a whole lot of features and task. I did however have to find out that SOAP support is generally non existant. Given the widely known problems with SOAP and the trend towards simpler REST based services and the young age of the Android platform this is not too surprising. However in reality lots people still need to work with (legacy?) SOAP services. If you are in that situation you should read on.
    (more…)

  • Recap Presentation about Maven and Android

    So yesterday I went over to Vancouver to present about Apache Maven and how it can be used for Android application development. There were about 20 people in the audience with a very wide range of exposure to Android development and Apache Maven. From my impression and the feedback on the meeting site everybody has learned something and had a good time. Just in case you missed it the Apache Maven and Android Development presentation slides are now available in PDF format. There is definitely a desire to introduce more power in the build process for Android application development and Maven is able to deliver that to many users.:

    I am pretty happy with feedback like

    • Great presentation, lots of details from a knowledgeable speaker.
    • Great technical presentation about developing Android applications with Apache maven. Lots of details, and very well presented.
    • Got useful tips on Maven and starting with Android dev setup
    • I was looking for a command-line method of building code, so this may be a solution. Good presentation
    • Interesting presentation, will definitely check out Maven a bit more now.
  • How to contribute to the Maven books

    Tim O’Brien recently invited me to write the Android development chapter for the book Maven: The Complete Reference and the first cut is in production on the site now. Since I aim to continue to help out with the chapter and John Yeary asked me for some help about contributing I thought I just jot a few pointers down. Don’t get daunted by my post here – it is really easy.
    (more…)