This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Android and the fly likes Problem with BroadcastReceiver and IntentService Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "Problem with BroadcastReceiver and IntentService" Watch "Problem with BroadcastReceiver and IntentService" New topic
Author

Problem with BroadcastReceiver and IntentService

Ozzy Boshi
Greenhorn

Joined: Sep 21, 2012
Posts: 7
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)


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem with BroadcastReceiver and IntentService
 
Similar Threads
Beginning Android, activity / service question
Create service to run after time
Activity Expired Time Out From BroadcastReceiver (need ASAP solution)
Start application on bootup android device !
AppWidget problem