I am trying to do specific task in a separate thread in android using Thread Pool executor with the Max thread size of 5 making sure there can be five parallel task would be run at a time. But problem with this approach is When I close my application the thread will also be killed. I want this to run out of application scope. I could have opted for service with the AIDL . But problem with this is I need to keep on bind and unbind to the service and I need to parcel the object before I need to send it. Also when the task is completed i need to communicate back to the calling application. This I could any how achieve using Broadcast. I was wondering If I can make a thread run in a separate process or I need to go with AIDL only ? Please help me understand!
问问题
412 次