Just to update this topic, it seems that even HTC Hero is facing the same issue.
Does anyone know if there are any plans to provide push notifications? On Mar 22, 2:46 pm, Derek <[email protected]> wrote: > Mark, > > It doesn't seem to consume battery. I've tried several solutions and > only yours is really working. > Before I used a regular service with aAlarmManager.set(...) to > schedule service run every minute. > It worked fine on emulator (even when killing the service) but on real > devices it failed often. > I mean sometimes the Alarm did no go off after a few hours. That's why > I tried your solution based onAlarmManager.setRepeating(...). > > What do you think about it ? > > On Mar 21, 9:28 pm, Mark Murphy <[email protected]> wrote: > > > > > Derek wrote: > > > Refresh is every minute. > > > :: blink, blink :: > > > Every *minute*? > > > That's not really a good idea. > > > If you have a short-term need for an every-minute bit of work, you may > > as well use a regular Service and a Timer/TimerTask. This would, by > > definition, eliminate your classloading problem, because you wouldn't be > > starting and stopping the service. > > > If you have a long-term need for an every-minute bit of work, you might > > want to switch to developing for things that don't run on really small > > batteries and have very little RAM. :-) > > > While my WakefulIntentService sample uses a five-minute period, even > > that's kinda frequent -- I only use that to limit frustration for people > > testing the code. > > > > Here is the WakefulIntentService I'm using: > > > That resembles one I wrote. Releasing the lock in finally {} is a good > > move -- I need to fix mine for that. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://twitter.com/commonsguy > > > Android 2.0 Programming Books:http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

