Grokking Android

Getting Down to the Nitty Gritty of Android Development

Wrapping Your Head Around Android’s Plurals

By 6 Comments

Android has this nice feature to make your handling of strings with numbers easy. If you want to display slightly different messages that depend on how many items a user has selected, you can use Android’s plurals element in your strings.xml: Of course you have to use this string somewhere in your code and you […]  Continue Reading  “Wrapping Your Head Around Android’s Plurals”

Handling Binary Data with ContentProviders

By 3 Comments

To share binary data across app boundaries Android’s programming model expects you to use content providers. And while I have covered how to access content providers and how to code one yourself, I haven’t covered how to deal with binary data. I am going to correct that in this post. How to access binary data […]  Continue Reading  “Handling Binary Data with ContentProviders”

Checking Intent Availability in Android

By 5 Comments

Intents are probably Android’s most powerful tool. They tie together loosely coupled components and make it possible to start Activities that are not part of your own app. Using intents you can delegate to the Contacts app to select a contact or you can start the browser, share data and so on. The receiving apps […]  Continue Reading  “Checking Intent Availability in Android”

Android Tutorial: Adding Search Suggestions

By 16 Comments

In this tutorial I am going to cover search suggestions. It’s the second and last part of a tutorial on Android search. In the first part I covered the basics of how to use the search framework of Android within your app. If you haven’t read it yet you might want to do so now. […]  Continue Reading  “Android Tutorial: Adding Search Suggestions”

Android’s ContentProviderOperation: “withYieldAllowed” explained

By 2 Comments

Whenever you use a ContentProviderOperation and have to insert, update or delete many records, the method withYieldAllowed() comes in handy. Normally the batch job would be executed in one transaction that spans all operations. But if your job contains many manipulations, the transaction might last quite a while and it might block other tasks from […]  Continue Reading  “Android’s ContentProviderOperation: “withYieldAllowed” explained”

Android Tutorial: Adding Search to Your Apps

By 22 Comments

Search on Android is a big topic. On every device’s homescreen is the Quick Search Box by default, older devices even had a dedicated search button. With the Quick Search Box you can quickly search the web, search for apps or contacts and search within all apps that are configured for global search. Many apps […]  Continue Reading  “Android Tutorial: Adding Search to Your Apps”

Why is There no Configuration by Default for Android Search?

By 2 Comments

If you use Android search a lot you will have noticed that you write the same lines of code again and again. You have to configure two things to make Android’s search work: the meta-data to use for search and which Activity to use for search Coming from the Java EE world, this reminds me […]  Continue Reading  “Why is There no Configuration by Default for Android Search?”