On 11 August 2010 11:57, CaryWang <[email protected]> wrote:
> NO,getApplicationContext() is Service Context don't Activity Context.

Service got no Activity, remember? Just use getApplicationContext() as I said,
because it's valid for services too, becasue:

java.lang.Object
   ↳    android.content.Context
           ↳    android.content.ContextWrapper
                   ↳    android.app.Service


and your toast will appear on screen. It's irrelevant what activity is currently
visible.

-- 
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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to