2

I am stuck with a scenario in which i am having my application and a service. i need to start a service when my application is closed, and i need to stop my service when my application is running, in the service i will launch a thread which will be fetching the location , i know that there are mutiple options to implement this scenario. but i am confused which one to use, should i use AIDL to implement, or to use extra bundle in the intent used to start the service,or do i have to bind to service from my activity , or use simple boolean variable making it true and false depending on application is started or closed. Any kind of help is highly appreciated. Thanks

4

0 回答 0