title: Android - How to restart system_process programmatically?
body: <p>I have an android device, which runs my app as system app. In this app there is an update function, which download the new version of the apk from the internet and then overwrites the apk on the device. After that I need to restart the application... and this is my problem, I have tried many ways:</p>
  
  <pre><code>finish();
  
  Intent i = getBaseContext().getPackageManager().getLaunchIntentForPackage(getBaseContext().getPackageName() );   
  i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK );
  startActivity(i);
  
  System.exit();
  
  android.os.Process.killProcess(pid);
  </code></pre>
  
  <p>I noticed that if I stop the system_process in Eclipse, my devices is restarting, app is upgrading and the new version of my app is running.
  So my question is, how can I stop/restart system_process programmatically? Or have you got any good idea to restart and run my new versioned app?
  Thx :)</p>