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
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,
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.
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
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
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,
6 matches
Mail list logo