title: android app crashes when exceeded Thread pool 9 and queued tasks 128
body: <p>The application conduction api calls in every 10seconds with the gps location from the network provider. And also there are several api calls can be do by the user. </p>
  
  <p>application is crashing with law internet or less internet connection(device data access)
  is there a proper way to prevent app crashing and hold the api request till the internet network available. </p>
  
  <p>here im posting my crash reprort stacktrace</p>
  
  <pre><code>java.util.concurrent.RejectedExecutionException: 
  Task android.os.AsyncTask$3@4206a5b0 rejected from java.util.concurrent.ThreadPoolExecutor@41e97858[Running, pool size = 9, active threads = 9, queued tasks = 128, completed tasks = 2]    
  at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2011)  
  at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:793)  
  at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1339)    
  at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:590)   
  at com.pickme.driver.service.LocationUpdate$LocationUpdateTask$1.run(LocationUpdate.java:216)   
  at android.os.Handler.handleCallback(Handler.java:733)  
  at android.os.Handler.dispatchMessage(Handler.java:95)  
  at android.os.Looper.loop(Looper.java:136)  
  at android.app.ActivityThread.main(ActivityThread.java:5333)    
  at java.lang.reflect.Method.invokeNative(Native Method)     
  at java.lang.reflect.Method.invoke(Method.java:515)     
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:895)  
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:711)     
  at dalvik.system.NativeStart.main(Native Method)
  </code></pre>