android - stopping a service using stopself() -
I have written a service that listens to some callback and receives viscid and then passes through the VCard service ( This class was defined in the Android Contacts app and I am using it). Now when I stop VCardService, I want to stop this service. I know that we can check whether a service is still running or not. But I need to know the calling service only after service. not otherwise.
I'm not sure what you really want, but if you want to stop the service < / P>
The Calling StopSL () method will stop the service, you do not have to stop it yourself, you should know where and when stopSelf () method will stop. Public class extends the MyPersonalService service {@Override Creates on Public Zero () () Suppose that you are downloading some files, so when you download your file, Prevent yourself like this: this.stopSelf (); }
Comments
Post a Comment