[android-developers] Re: How to start a service without using any activity??

2009-10-19 Thread pink 444
My manifest file is as follows and in which i want to start my service. application android:icon=@drawable/icon android:label=@string/ app_name android:enabled=true service android:enabled=true android:name=.MyService intent-filter

[android-developers] Re: How to start a service without using any activity??

2009-10-18 Thread pink 444
I am starting my service in an Activity with StartService() method.But i don't know how to start service from application.Thus whenever my activity is destroyed and rebuilt new service is created. How can i create/start my service from other than Activity? On Oct 18, 5:43 am,

[android-developers] Re: How to start a service without using any activity??

2009-10-17 Thread Farproc
You can try to code, and then post the problem you encounter. On 10月17日, 下午1时10分, pink 444 pnk...@gmail.com wrote: Thanks for your replay. Can you give me a example . On Oct 16, 2:55 pm, Farproc farp...@gmail.com wrote: First, you do not have to start/stop aservicefrom a Activity.

[android-developers] Re: How to start a service without using any activity??

2009-10-16 Thread André
It solely depends upon your implementation whether a service starts, shuts down or restarts; regardless whether you do this from your application or an activity. In other words you shouldn't shut down the service once the activity finishes. This will keep it running and next time your activity

[android-developers] Re: How to start a service without using any activity??

2009-10-16 Thread Farproc
First, you do not have to start/stop a service from a Activity. You can do that in anywhere via a Context object(which is very easy to retrieve). If you want to start a service, just call Context.startService(), form then on the service will keep running in background until you explicitly

[android-developers] Re: How to start a service without using any activity??

2009-10-16 Thread pink 444
Thanks for your replay. Can you give me a example . On Oct 16, 2:55 pm, Farproc farp...@gmail.com wrote: First, you do not have to start/stop a service from a Activity. You can do that in anywhere via a Context object(which is very easy to retrieve). If you want to start a service,