Re: [android-developers] Service Vs Thread

2010-06-14 Thread tarek attia
Thank you so much for such help Again all my application requires the following :- 1. The application should be able to run in the background when other applications are running in the foreground. 2. When the application is on the foreground, it should shows certain stuff to

Re: [android-developers] Service Vs Thread

2010-06-14 Thread Kostya Vasilyev
Yes, this is exactly what services are for. Services are a way to tell Android that certain code in your application is important to the user, and Android should make an effort to keep it running even when it doesn't have active activities. For user notifications, take a look at

[android-developers] Service Vs Thread

2010-06-13 Thread tarek.attia
Hi all, I have a question what to Use ,Service Or Thread,as both run in the background -- 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,

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 03:46 PM, tarek.attia wrote: I have a question what to Use ,Service Or Thread,as both run in the background There is confusion here, because you are referring to two different meanings of the word background. A thread, in Java but also in many other languages, allows for

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 06:23 PM, Olivier Guilyardi wrote: On 06/13/2010 03:46 PM, tarek.attia wrote: I have a question what to Use ,Service Or Thread,as both run in the background There is confusion here, because you are referring to two different meanings of the word background. A thread, in

Re: [android-developers] Service Vs Thread

2010-06-13 Thread tarek attia
Thanks you so much for this clarification ,,exactly I want to make an application that keeps running while the user may went of the main application ,,and I guess Service will be the best candidate for doing that ,,, But what if the application will take much time ,,so should I make a thread

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Frank Weiss
The problem appears to mainly be the formulation of the question. In Android, an application doesn't run - it's just a collection of resources. Of those resources, Activities and Services can run, but their runtimes are relatively brief. Please try to explain what your application needs to do when

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Olivier Guilyardi
On 06/13/2010 06:49 PM, tarek attia wrote: Thanks you so much for this clarification ,,exactly I want to make an application that keeps running while the user may went of the main application ,,and I guess Service will be the best candidate for doing that ,,, But what if the

Re: [android-developers] Service Vs Thread

2010-06-13 Thread Olivier Guilyardi
On 06/14/2010 12:00 AM, Olivier Guilyardi wrote: On 06/13/2010 06:49 PM, tarek attia wrote: Thanks you so much for this clarification ,,exactly I want to make an application that keeps running while the user may went of the main application ,,and I guess Service will be the best candidate for