Is there any way I can detect programmatically with Firebase when an app is uninstalled from an Android device? I need this because when a user uninstalls the app, I want to take some actions (reset some fields, turns some booleans to false and so on). I read this but is there any more elegant solution? Or can it be done automatically? Thanks!
-
Possible duplicate of https://stackoverflow.com/q/45744408/4815718 – Bob Snyder Jul 30 '18 at 15:26
1 Answers
Sure it is! You can detect when an app is uninstalled on an Android device using an automatically collected Analytics event called app_remove
.
See here more details.
when an application package is removed or "uninstalled" from an Android device.
This event is different from the Daily uninstalls by device and Daily uninstalls by user metrics, which are both reported by Google Play Developer Console. The app_remove event counts the removal of application packages, regardless of the installation source, and the count changes depending on the date range you are using for the report. The Daily uninstalls by device and Daily uninstalls by user metrics count the removal of application packages only when they were installed from Google Play, and are reported on a daily basis.
-
Oh, thanks again Alex! Can it be done also in some way automatically? – Jane Ashley Jul 30 '18 at 15:33
-
Yes it can. As Bob Snyder mentioned in his comment, please see Jen Person's answer from that [post](https://stackoverflow.com/questions/45744408/cloud-functions-for-firebase-can-you-detect-app-uninstall). It is also my recommendation. – Alex Mamo Jul 30 '18 at 15:38
-