title: Get intent of uninstall app in android
body: <p>I just want to know about intent of uninstall app because of</p>
  
  <p>in my app when user opens the first screen then the device id will be saved in server side by using php.</p>
  
  <p>When user uninstall this app then automatically the device will be deleted in server side.</p>
  
  <p>For this i prepared code for php for delete device id. So when will i call this webservive.</p>
  
  <p>I tried below code  </p>
  
  <pre><code>public class MyReceiver extends BroadcastReceiver {
  
  @Override
   public void onReceive(Context context, Intent intent) {
   String action = intent.getAction(); 
   if("android.intent.action.PACKAGE_REMOVED".equals(action)){
     // here i wrote the code of  delete device id in server side
  }
  </code></pre>
  
  <p>But it is not working because the intent was not raised. So please tell me what intent will be raise when user uninstall the app or tell me any suggestions for solve my problem.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Regards </p>