检测是否我的应用程序卸载 [英] Detect if my app is uninstalled
问题描述
是否有可能有一个code的检测,如果我的应用程序已被卸载和卸载后,所有的我的应用程序已经创建了相关的文件夹会被自动删除?
Is it possible to have a code that detect if my app has been uninstalled and upon uninstalling, all the relevant folders that my app has created will be deleted automatically?
谢谢!
推荐答案
感谢您的解决方案!至少我现在知道我的应用程序无法检测卸载。
但我已经解决了删除所有我的应用程序已经通过将相关的文件夹中创建的相关文件夹的问题: context.getExternalFilesDir(空).getAbsolutePath()
每次Android的卸载乌尔应用程序,它会删除一切在 /mnt/sdcard/Android/data/com.yourapp.com
文件夹。
context.getExternalFilesDir(空).getAbsolutePath();
把UR文件夹里面的到/ mnt / SD卡/安卓/数据/ COM。 yourapp.com
文件夹。
Thanks for all your solutions! At least I know now my app cannot detect an uninstall.
But I have solved the problem of removing all the relevant folders that my app has created by placing relevant folders in: context.getExternalFilesDir(null).getAbsolutePath()
Everytime Android uninstall ur app, it will delete everything in the /mnt/sdcard/Android/data/com.yourapp.com
folder. context.getExternalFilesDir(null).getAbsolutePath();
put ur folders inside the /mnt/sdcard/Android/data/com.yourapp.com
folder.
这篇关于检测是否我的应用程序卸载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!