[android-developers] Re: Activity blocks till service completes

2009-10-12 Thread abhi
I created a new thread and tried starting the service from there, but the service is not being started from the new thread. When I set a break point in the new thread, it does not hit and there is nothing updated on logcat. Any ideas as to why this is happening? From my main class, I am creating

[android-developers] Re: Activity blocks till service completes

2009-10-12 Thread Mark Murphy
abhi wrote: I created a new thread and tried starting the service from there, but the service is not being started from the new thread. No, you start the thread *in* the service. All Android components are started on the UI thread. If you want a component to use a background thread, that

[android-developers] Re: Activity blocks till service completes

2009-10-12 Thread Dianne Hackborn
I don't see you creating a service anywhere in your code service, so I'm not sure what you mean about creating one and not having it run... yes, if you don't create one for your service there won't be one for it to run. :} You need to make a thread in your service -- either in onCreate() or

[android-developers] Re: Activity blocks till service completes

2009-10-12 Thread abhi
When I created the thread in the Service itself, it worked. Thank you very much! On Oct 12, 12:37 pm, Dianne Hackborn hack...@android.com wrote: I don't see you creating a service anywhere in your code service, so I'm not sure what you mean about creating one and not having it run...  yes, if

[android-developers] Re: Activity blocks till service completes

2009-10-11 Thread Dianne Hackborn
Services don't take focus input focus -- a service doesn't cause the current window to lose input focus, nor the foreground activity to be paused. If you mean the thread of your activity isn't running, then you may just be doing all your work in the service on the main thread. Please note that a