Hi all,

I am trying restart a service already started and calling to the first
intent created. I am doing it adding this line to the
AndroidManifest.xml in my service declaration:
<service android:enabled="true" android:name=".myservice"
android:process=":remote" android:launchMode="singleTask">

Also, I create the instance of the service like this:
intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);

But, when I launch the app twice I have this error:
ERROR/AndroidRuntime(733): java.lang.RuntimeException: Unable to start
service <myservice>d...@43599140 with Intent { action=<myservice>
flags=0x20000000 }: java.lang.IllegalThreadStateException: Thread
already started.

Does anybody how can I do it?

Thanks




--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to