• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with BroadcastReceiver and IntentService  RSS feed

 
Ozzy Boshi
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • 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)


 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!