I am using an IntentService in a alarm manager to trigger it after every 15 seconds.
I have to continuously send large amount data to server and receiving large amount of data in response in background.
I have to follow beneath process :
After a lot of struggle finally i got a solution :
I simply used separate process to work for the intent-service.
using this in "Manifest" file
<service android:name=".BackgroundSyncDataService" android:process=":my_process"> </service>
The colon prefix in front of the name tells Android that the Service is private to its declaring application. If the colon is not used, the Service would be a global process and can be used by other Android applications.
Running a service in its own process gives it its own memory address space and a garbage collector of the virtual machine in this process does not affect the application process.
Running a service in its own process will not block the application in case the service performs long running operations in its main thread.