> > I want to run a background thread or service till application is in > foreground. > Ok...
Means i want that service to run in background only if any activity of an > application is in foreground and visible. > You want the service to run when ANY activity is visible? That would be all the time... There is always an application that is visible. Otherwise there wouldn't be a UI on the screen... Or you are wanting the service to run if one of YOUR activities is visible? when application is in background or not running i.e no activity is in > foreground or visible it should stop service or cancel that background > thread. > So what do you want? First you said you want your service to run until your application is in the foreground. Now you are saying you want your service to run only when you application is visible... A couple questions: - What have you tried so far? - What specifically are you having a problem with? My advice: - Read this: http://catb.org/esr/faqs/smart-questions.html - Do some work on your own - Ask a more specific question Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Jul 10, 2012 at 11:14 PM, NayAnesh Gupte <nayanesh.gu...@gmail.com>wrote: > I want to run a background thread or service till application is in > foreground. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en