gpt4 book ai didi

android - 卸载应用程序时如何以编程方式清理缓存?

转载 作者:行者123 更新时间:2023-11-29 01:00:48 25 4
gpt4 key购买 nike

我有一个聊天应用程序,未读的聊天消息在应用程序 Logo 上方被描述为未读,如图片所示(图片仅供示例),问题是当我删除应用程序并重新安装它时,即使我没有在应用程序中登录我的帐户,以前的未读消息计数器再次设置为新安装。卸载我的应用程序时是否可以自动清理缓存。我为 Logo 设置未读消息的代码:

enter image description here

                    if (unread_message > 0)
ShortcutBadger.applyCount(CasesActivity.this, unread_message);
else
ShortcutBadger.removeCount(CasesActivity.this);

最佳答案

试试这个 - 将 android:allowBackup="false"和 android:fullBackupContent="false"放在 manifest.xml 的标签中

所以 -

<application
android:allowBackup="false"
android:fullBackupContent="false">

关于android - 卸载应用程序时如何以编程方式清理缓存?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51310986/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com