Android

setForeground() missing in Android 3.0 services

While upgrading my application’s code to use the Android 3.0 SDK, I stumbled upon a small problem in my service code: the setForeground() function has been removed from Android 3.0 completely, making the compilation process fail. The function removal broke the compatibility methods I had copied straight from the Android documentation ages ago for backwards compatibility:

Note: The methods startForeground() and stopForeground() were introduced in Android 2.0 (API Level 5). In order to run your service in the foreground on older versions of the platform, you must use the previous setForeground() method—see the startForeground() documentation for information about how to provide backward compatibility.

(So in other words, if the user’s device has Android 2.x, the startForeground() function must be called. If the user’s device has 1.x, setForeground() should be called instead. setForeground() will not work on Android 2.x, and vice-versa).

Fortunately, this was an easy fix – the documentation has been updated with a new, more future-proof code sample for calling the right functions depending on the device’s Android version. In my case I had modified the old sample code to my liking, so I decided to add a small function to my service that will call the setForeground() method through reflection instead:

Problem solved!

Comment icon 1 Comment »

Announcing Clipper 1.2

I’m excited to announce a new version of Clipper, version 1.2. Clipper is a free clipboard & snippet manager for Android, and is available on the Android Market.

In the last six months, Clipper has received almost 9000 downloads, and tens of users have sent me feedback and have helped me develop Clipper to what it is today. Version 1.2 is the direct result of this feedback – it’s a big overhaul of the whole application, and includes many features that have been requested in the past months.

Starting with 1.2, Clipper is also split into two versions: the free version, and the Plus version which (at the moment) costs 0.99 euros in the Android Market.

You can read more at the rojekti announcements blog. If you use Android, why not check it out from the Android Market?

Comment icon Read more or comment »

Clipper: freeware on the Android Market, 2 months later

It’s been nearly two months since I released the first version of Clipper, my freeware application for Google’s Android smartphone operating system.

During that time, Clipper has had over two thousand (2000) downloads: check out this graph:

At the time of writing, the download tally is now at 2067 total downloads and 1212 active installations. Over a thousand people are using my application!

You can find more details about Clipper from its website. Clipper is supported on phones running Android 1.5 or above (practically any Android phone).

Developing the application has been a pleasant experience in general. I’ve received a lot of useful user feedback and encouraging comments via mediums like e-mail and Twitter!

One tiny problem I’ve had while developing is that I don’t own an Android phone1: although the emulator works well, it’s not very fast and makes it hard to design functional touch-screen interfaces – in fact, a recent update to Clipper completely changed the way the main screen functions when I realized how unintuitive the previous behavior was.

In any case, I look forward to developing more applications!

1 The HTC Desire looks very attractive!

Comment icon 1 Comment »

Clipper 1.0.3 and a new website

Continuing the saga of Clipper, my Android freeware app: I’ve just released version 1.0.3 that adds support for Android notifications. There are two modes of operation: a permanent notification that will never go away or a notification that shows up whenever a new clipping has been added.

I’ve also built a new website for Clipper using nanoc. See it here. nanoc is a very useful tool, and it works perfectly for the purpose. No need to set up some complicated CMS!

265 downloads.

Comment icon Read more or comment »

Clipper, part two

It’s been four days since I’ve released Clipper, a simple Android application to keep track of the user’s clipboard. Anything the user copies is stored for later viewing, editing and usage.

So far, I’ve released 2 minor updates to the app, adding the following features:

  • Ability to “pin” a clipping: by default, 10 clippings are stored in the history and old ones are automatically pruned. You can save a clipping from doom by pinning it.
  • All kinds of UI tweaks and improvements
  • And probably the most important feature, Android 1.5 support!

Android devices are running different versions of the operating system – at the time of writing, the newest version is 2.1. The 1.5 version is around a year old, and some devices like the HTC Hero still run it: it’s kind of surprising seeing how even the very first Android phone has been upgraded to 1.6.

At the moment, Clipper’s been downloaded 139 times and 118 of those downloads are active installations (meaning that the application is still active on the user’s device).

It’s not much, but it’s more than I expected, especially seeing how my only method of advertisement was to post a link on reddit’s Android subreddit (as confusing as that sounds). The comments were positive in general and I even got a bug report.

Regarding user feedback on the Android Market, Cyrket has been useful in filing in for Google’s lack of statistics and comments for developers: I can only see the current amount of downloads and active installs and the app rating. I can’t see comments or historical download stats, nor can I reply to user comments.

One user has also been in touch using e-mail: they’ve given me great feedback and many of their ideas have been implemented.

What’s next?

  • Start unit testing. Proper TDD practice would be to write tests first, implement second. Android seems to provide a framework for testing the user interface, which sounds like something worth checking out.
  • UI improvements and new features. Many users have requested support for notifications in the Android status bar.
  • A real website: I think that nanoc3 will work out very well for the purpose.
Comment icon Read more or comment »