• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with BroadcastReceiver and IntentService

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello JavaRanch Forum,
I am a begingger in Android Java Programming and I stumbled upon a problem.

I want, every time my phone boots up, a service that is activated every x minutes.
In order to do this I tried to use a BroadcastReceiver that creates a new AlarmManager object in this way.



I set up my android manifest file and all seems ok to me.
When the phone boots up i see the "Receiver OK" message on my Logcat window.
At this stage i'd expect that this broadcast receiver, every minute, is set to launch a new instance if UpdaterService.class but it doesn't happen.
Right now the UpdaterService class is a subclass of IntentService and it's made of only of a constructor and a onHandleIntent() method (overridden).
Inside the onHandleIntent there is only a Log.d() , so at the end i would expect to see this Log.d passing through my Logcat window but this does not happen, can someone tell me why?
If i try to launch UpdaterService from an Activity using startservice(), updaterservice fires up and the Logcat window show the messages (but only once of course)


reply
    Bookmark Topic Watch Topic
  • New Topic