:) yeah I find the emulator slow its just easier with a phone.
On 29 November 2010 11:39, Evi Song evis...@gmail.com wrote:
Thank you all for the discussion which saves my investigation.
I was using the Handler.postDelayed() with something like a
AlarmRunner to make a count down. Then I get
Thank you all for the discussion which saves my investigation.
I was using the Handler.postDelayed() with something like a
AlarmRunner to make a count down. Then I get the same problem that,
handler paused when my phone standby.
I'll switch to AlarmManager instead according to your suggestions.
Hi guys thx for your help, been playing around with it and I tried setting
up a service which works, but this will run in the background all the time
so if I use an alarm manager how accurate is it can you set one for say 30
seconds time, or is it still bad to use a service even though all its
Paul,
You don't need a Service or a Handler to handle events from Alarm
Manager - just a Broadcast Receiver. It's even better, in that Android
guarantees to hold a wake lock for the duration of your receiver's
onReceive.
-- Kostya
28.11.2010 18:59, Paul Townsend ?:
Hi guys thx for your
:) this programing lark is fun isn't it, I will try the alarm thing next :).
On 28 Nov 2010 17:32, Kostya Vasilyev kmans...@gmail.com wrote:
--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
Just tried that bvut dose the same thing, although I have used
countdownTimer in a custom TextView that I wrote so I could have a countdown
timer for the UI and this dose not pause. I might look into to transfering
the other timer bits to the text view and use that as a all in one timer
solution
You don't need to try around with different things, the behavior is very
well defined: if you are not holding a wake lock, the CPU is allowed to go
to full sleep, so no code can be executed until an external event wakes it
up. A thread sitting there waiting on a timer is never an external event.
You may want to look at CountDownTime also. It seems to work fine
(even when the Screen goes off).
I took the following from the web:
public class MyCount extends CountDownTimer {
public MyCount(long millisInFuture, long countDownInterval) {
super(millisInFuture,
8 matches
Mail list logo