title: Listen to own application uninstall event on Android
body: <p>As far as I know, apps can't get intents for their own uninstallation:</p>
  
  <ul>
  <li><a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_FULLY_REMOVED" rel="noreferrer">ACTION_PACKAGE_FULLY_REMOVED</a></li>
  <li><a href="http://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REMOVED" rel="noreferrer">ACTION_PACKAGE_REMOVED</a></li>
  </ul>
  
  <p>But <a href="https://stackoverflow.com/questions/18440293/how-does-dolpin-web-browser-get-notified-when-its-being-uninstalled">how does Dolphin Browser manage to receive a "removed" event and start a browser as in the attached image</a>?  </p>
  
  <p><img src="https://i.stack.imgur.com/rL33T.png" alt="enter image description here"></p>
  
  <pre><code>ADB:
          10-20 12:37:00.997: D/BackupManagerService(527): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:mobi.mgeek.TunnyBrowser flg=0x8000010 (has extras) }
      10-20 12:37:00.997: V/BackupManagerService(527): removePackageParticipantsLocked: uid=10112 #1
      10-20 12:37:01.007: D/dalvikvm(527): GC_EXPLICIT freed 2247K, 12% free 20128K/22868K, paused 3ms+10ms, total 212ms
      10-20 12:37:01.107: D/dalvikvm(527): GC_FOR_ALLOC freed 1508K, 15% free 19649K/22868K, paused 60ms, total 60ms
      10-20 12:37:01.137: D/AndroidRuntime(4028): Calling main entry com.android.commands.am.Am
      10-20 12:37:01.137: D/dalvikvm(4028): Note: class Landroid/app/ActivityManagerNative; has 163 unimplemented (abstract) methods
      10-20 12:37:01.147: I/ActivityManager(527): START u0 {act=android.intent.action.VIEW dat=http://survey.dolphin.com/int/uninstall?id=014f4d1981d6f88bb56630e7a3a7550a&amp;pn=mobi.mgeek.TunnyBrowser&amp;v=248&amp;s=ofw&amp;it=1382250136565&amp;ut=1382250127000&amp;m=Nexus 4&amp;os=android&amp;osv=4.3&amp;cc=US&amp;no=40471&amp;lang=en&amp;jk=uninstalled&amp;ft=212&amp;ht=957&amp;ct=0&amp;nt=1&amp;res=768*1184&amp;ifi=1&amp;lts=1&amp;iow=0&amp;iom=0&amp;iospd=0&amp;iogs=0&amp;debug=false&amp;t=1382252820000 flg=0x10000000 cmp=com.android.chrome/com.google.android.apps.chrome.Main} from pid 4028
      10-20 12:37:01.157: D/AndroidRuntime(4028): Shutting down VM
  </code></pre>