Category Archives: Android

GDG Android bootcamp at c-Base

Droidcon Berlin 2013 is starting and the good folks of GDG Android Berlin organized a  Android training session as a good warm-up for the actual conference. The session was held at c-Base, the famous hacker space/crashed space station on Saturday morning 6th of April. The doors opened at 09:00 in the morning, which is a pretty tough time to wake up on a Saturday. I made it there around 09:20 and was among the first to show up Рthis is Berlin after all.

There was a never-ending supply of free Club Mate and food
There was a never-ending supply of free Club Mate and food

After some initial attempts of getting the microphones working, Benjamin Weiss was on the stage with the topic of Android 101. He covered some of the basic ingredients of an Android app, including the AndroidManifest.xml, Activities and Intents, Views, and application lifecycle. Also he gave some good pointers on where to learn more, such as, stackoverflow and openintents. While it was good stuff, I sort of missed an overall picture of what Android apps consist of; now it was more like a collection of useful info on various topics but nothing to really bind them together.

Next was Hasan Hosgel with the topic of Lists and Adapters. The basics of using the Android ListView and supplying data and custom behaviour using Adapters were covered. This was a well focused and good presentation. The topic itself wasn’t terribly exciting, but the ListView is useful in almost any kind of application.

Then it was Christian Ketterer going into much more detail about Intents. I found this part maybe the most interesting, at least judging by the large amount of notes I took. Both an overview of what Intents are used for (starting an Activity, sending a broadcast or starting service), and several good examples of using Intents were presented. Some particularly interesting parts were how to create a new contact with Intents, or how to start an Activity and get results back from the started Activity with startActivityForResult. Also, how to enable other developers to use your app via Intents by adding an Intent filter in AndroidManifest.xml, and by publishing your Intents on

Stephan Linzner covered the Android testing framework, which is based on JUnit 3. It seemed that this part of the Android framework was less familiar to the audience than the ones that were covered previously. Lots of good stuff for how to create automated tests for Android apps were shown, including test cases, test packages, how to use mock objects and contexts and how to use RenamingDelegatingContext to mock file accesses.  Perhaps my favourite was the Monkey tool which generates random input events to your app (iike a real monkey tester would do), often succeeding in making it crash. Running Monkey on the build server overnight seems like a cool idea!

Tim Messerschmidts topic was Managing Data Like a Boss. It was about the underlying SQLite database engine that Android apps rely on. SQLite is already familiar me on the C API level, and in the Android context it doesn’t look all that different. An introduction of SQLite was followed by how to perform queries, and how to iterate over the query result sets using Cursors. I got it that it’s not a good idea to call the getCount method often, as it’s expensive. Another good tidbit was the feature called FTS tables. These are a special type of table that enables fast Full Text Searches, which I found very useful. He also reminded us to use SQLite asynchronously, by creating a thread or an AsyncTask for all database operations. This makes me question: Why does the Android framework, being a high-level framework, offer synchronous (blocking) methods for SQLite access in the first place?

Stefah Hoth showed us how to get our apps published on the Google Play Store so we can make a lot of money with our brilliant apps. A good take-home message was that we should consider what permissions our apps should use – the more permissions they need, the less likely that the app will be included in the search results when an user searches for apps. For example, if you require permission to use the camera, then Nexus 7 users will never see the app as the Nexus 7 only has a front camera. Same for telephony etc..
During the session Stefan successfully published an incredibly useful app called BigRedButton, which some people in the audience were instantly able to install and rate..

Mister Ligi talked about Google+ Signin Integration. I was getting a little too tired at this point and was no longer able to concentrate, so unfortunately I missed the point here.

During the breaks I had some exciting chats with the other attendees and of course consumed some of the excellent sandwiches, fruits and Club Mate that was available thanks to the sponsors. Unfortunately after the official part of the day was done, I had to be elsewhere, otherwise I would have stayed and enjoyed the chance to chat some more and maybe have a beer or a few. I thank the organizers and the sponsors for a great Saturday, it’s events like this that prove Berlin is a great city for people who are into technology!