Mobile Dev

Detect Android App Uninstall & Notify Server

Discover why Android apps can't directly detect uninstall or call APIs. Use server-side FCM silent pushes for reliable android app uninstall detect, with DeviceAdmin limitations, broadcasts, and best practices for server notifications.

1 answer 1 view

How can I detect when an Android app is uninstalled and notify my server? Specifically, can the app itself call an API when the uninstallation starts? I don’t want to infer installation status from user activity. What methods are available to trigger a server notification on uninstall (for example, uninstall broadcasts, DeviceAdminReceiver/Device Administrator APIs, Google Play/Firebase/FCM callbacks, or server-side heuristics), and what are the limitations and recommended approaches?

Android can’t provide a direct android app uninstall detect mechanism where the app itself calls your server during uninstallation—the process gets killed instantly, preventing any code execution like API calls or android uninstall callback. No android uninstall listener or broadcast exists for the uninstalling app to trigger a server notification reliably. Instead, the most practical android detect app uninstall method uses server-side FCM silent pushes to spot delivery failures, though it’s inference-based with delays, not real-time events.


Contents


Sources

  1. DeviceAdminReceiver | Android Developers
  2. DevicePolicyManager | Android Developers
  3. Set up a Firebase Cloud Messaging client app on Android | Firebase
  4. How to detect when an Android app is uninstalled | Stack Overflow
  5. How to track uninstalls on Android | AppsFlyer
  6. How to track uninstalls on Android and iOS | Adjust
  7. Google Play Referrer API | Google Play Console Help

Conclusion

Direct android app uninstall detect from the app remains impossible due to Android’s security model—no broadcasts, callbacks, or API calls can fire during uninstall. Lean on android fcm uninstall detection via server-side silent pushes for reliable inference, combined with analytics for better accuracy. This approach handles millions of devices at scale, but expect some false positives; test rigorously before rollout.


Authors
Verified by moderation
Moderation
Detect Android App Uninstall & Notify Server