0

How to start an Activity ,Service or broadcast receiver before an application uninstalled by the user who has earlier installed the app on his/her device?

If possible please help me? and thanks in advance

Chetan Patil
  • 542
  • 1
  • 5
  • 23

2 Answers2

3

You can't detect for your app whether it has installed or uninstalled but for other apps you can get this detail using this BroadcastReceiver.

<receiver android:name=".UninstallApkReceiver">
    <intent-filter>
        <action android:name="android.intent.action.PACKAGE_REMOVED"/>
    </intent-filter>
</receiver>
N Sharma
  • 33,489
  • 95
  • 256
  • 444
1

YES using Accessibility Service you can detect Uninstall event and then read rhe screen to find app name. Voodo app uses this concept.

Dhruv
  • 11
  • 1
  • I just tested this an confirmed it works in Android 7.1.1. You can try out the app here: https://play.google.com/store/apps/details?id=com.voodoo.android – Sam Apr 30 '17 at 04:32
  • Hi, Dhruv. Happy Diwali!! If you are aware of the Quora app, when I delete the app, it shows my account has been deactivated. Any idea how to do it? – Therii Nov 04 '21 at 17:39