Tried just now what you said. Still, the background process didnt start. I am sure if I will launch the emulator one or twice more, I will get the service running. The thing, is I dont get any of the log message at all starting from the BootCompletedIntentReceiver. Do you think because I get this BOOT_COMPLETED Intent sometime and sometime not ? Weird even when I am writing this!
-Jaikishan On Tue, Jul 15, 2008 at 12:43 AM, Mark Murphy <[EMAIL PROTECTED]> wrote: > > > After doing some more testing, I observed that its still happening that > > the background service sometime runs and sometime doesn't run. > > You might consider replacing: > > long firstTime = SystemClock.elapsedRealtime(); > > with: > > long firstTime = SystemClock.elapsedRealtime() + 10 *1000; > > (where 10 *1000 is the time you're using between clock pulses). > > In your current code, it may be that firstTime is technically in the past > by the time AlarmManager tries using the value, due to other processing in > the emulator, or just the clock ticking forward in between statements. > Setting the first time to be in the near future should resolve this > problem. > > If that doesn't help, could you clarify what you mean when you say > "sometime runs and sometime doesn't run"? For example, I see various Log > statements in your code. When you don't get the expected behavior, what is > the log telling you? > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > _The Busy Coder's Guide to Android Development_ -- Available Now! > > > > > -- Thanks, Jaikishan --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

