title: prevent app to clear application data while running in background
body: <p>I am developing an android application related to gps. that is sending location information periodically to the server. sometime i am getting process killing issue in some devices. </p>
  
  <p>if my application running in foreground then its working file. but while we minimize app and move it to back or once phone going to sleep then app automatically clearing all application data and variables. and then when we tried to resume activity back, it showing blank information and generating exception.</p>
  
  <p>how to prevent clear app data while app running in backgtound? i want to keep this information as it is. this issue only arise in some devices not all.</p>
  
  <p>i have also tried research on Google, but not getting any good solution.</p>
  
  <p>Please Help me. Thank you.</p>