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 :
I am reading data from Database through queries.
Then converting it in Json through POJO architecture.
Sending this JSON in request to server using Retrofit Library.
Receiving data in response.
Inserting this data to my database through certain queries if any updation in the database.
Is there any alternate approach? As i am facing ANR. If data is less, its working fine. But as data size is becoming large, UI halts and Application becomes unresponsive.