Intent.ACTION_SEND Crashes Facebook App

I came across a rather obscure bug today, while trying to submit my app Tap That! Number to the Amazon Appstore. I received a rejection notice detailing several problems with my app, including this strange one:

Application’s “Feedback” functionality “Facebook” option is not working.

At first I had no idea what this meant. My app never mentions Facebook at all. The only “Feedback” option I have is a menu item designed to send an email to the developer.

After digging around a bit, I found that the code I was using to launch an email intent was also recognising Facebook and presenting it in the list of available apps. Here’s the code I was using:

Read more

Live Wallpapers, and PreferenceActivity bugs

Android Live WallpaperI’ve been working on a new app lately – a CPU monitor live wallpaper for Android. There are some great tutorials & sample code out there if you’re looking at starting with live wallpapers. I recommend the Androgames tutorial, as well as the official Android documentation, and CubeLiveWallpaper sample application. Both tutorials take a slightly different approach, so make sure you understand the concepts (especially threading) thoroughly before writing your own wallpaper. I started off using the Androgames model, but then ended up completely rewriting the code to optimize battery use. The end result is much more like the CubeLiveWallpaper example.

While coding the settings screen for this app, I ran across two pretty major bugs in the current Android SDK. It seems the implementation of PreferenceActivity is quite broken, and has been for several versions of the SDK. In particular, ListPreference and CheckBoxPreference each have outstanding bugs which nearly every developer will encounter when trying to use these classes.

Read more