Database operations in IntentService results into application halt,become unresponsive and giving ANR : <p>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 : </p>

<ol>
<li><p>I am reading data from Database through queries.</p></li>
<li><p>Then converting it in Json through POJO architecture.</p></li>
<li><p>Sending this JSON in request to server using Retrofit Library.</p></li>
<li><p>Receiving data in response.</p></li>
<li><p>Inserting this data to my database through certain queries if any updation in the database.</p></li>
</ol>

<p>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.</p>
