Samsung GT-I5500 with Android 2.1-update1: AlarmManager not suitableNov 13th, 2010 | By fabian | Category: Blog
Recently, there was a Samsung GT-I5500 (Android 2.1-update1) user with a problem similar to that described in one of my recent posts (→LINK). So I sent him the test application I already used to figure out the AlarmManager problem on Samsung’s Galaxy S with Android 2.1-update. Here is the result:
If everything went OK, the whole red line should be covered by blue dots. But the result seems to be very odd, because there are many alarm events just missing, as you can see in this plot. So it’s not only that the CPU was not waked up correctly, it’s even that these alarm events are completely removed.
The second point: The user turned on the screen three times. At (roughly) half past two, at half past eight and finally at 10 o’clock. At these times, the last scheduled alarm, which was not fired up yet, was processed. Because the CPU stayed on for a short while at these times, multiple events went off (in the intended sequential way). Here, it is important to mention that the first event (respectively) of these sequences was delayed by an arbitrary amount of time (one minute at the maximum, of course).The following events had no time delay.
So my guess: Samsung avoids waking up the CPU from standby mode in general. The alarm events are not fired up until the user turns on the screen. This may save battery power in an efficient way, but it makes it impossible to schedule time-dependend tasks (like AlarmDroid does). This avoids abuse by unpractised application developers, but also rattens serious applicatoins.
And secondly: when scheduling repeating events, all events except the most recent are removed. In the background of the assumption above, this actually makes sense because it avoids repeating the same task multiple times once the screen turns on. But it’s unreasonable with application development.
I don’t think there is a workaround for these device/firmware combination. (I don’t know how former firmware versions behave.)
I’m sorry for all of you who buyed this phone. But my recommendation is to either buy another phone or to install an alternative firmware. The way it works now, you won’t enjoy Android very much because the AlarmManager is one of the most important tools in Android and it is used in many applications.