Betty,

Make sure your service calls base class methods in onCreate() and onStart(). Intents for processing are queued to a worker thread by IntentService.onStart. The worker thread is set up by onCreate.

class BettysService extends IntentService {

@Override
public void onCreate() {
... logging here ...
super.onCreate();
}

@Override
public void onStart(Intent intent, int startId) {
... logging here...
super.onStart(intent, startId);
}
.....
}

BTW, Android source can be found here:

http://www.netmite.com/android/mydroid/1.6/frameworks/base/core/java/android/app/

-- Kostya

23.06.2010 18:37, appsgrrl пишет:
Hi --

Thanks for replying.   I also have a logging printout in the
onStartCommand() method, and that does show as being called.
If onStartCommand() is called, doesn't that mean my startService()
from my Activity has indeed started my IntentService?

Who ultimately calls onHandleIntent()?  That's what I cannot figure
out from the docs.

Betty


On Jun 23, 4:02 am, Mark Murphy<mmur...@commonsware.com>  wrote:
On Wed, Jun 23, 2010 at 1:03 AM, appsgrrl<bettyoch...@gmail.com>  wrote:
I'm tryng to get an IntentService to work, and I have extended
IntentService, and I implemented a onHandletIntent(Intent) method.  I
put some logging in there, but this method never gets called.
I must be doing something really dumb, but I don't know what it is.
Is there something else I need to implement or override, or whatever,
to make this work?
No, that's pretty much it. Are you sure whatever is supposed to be
calling startService() is actually calling startService()?

--
Mark Murphy (a Commons 
Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!


--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to