卸載並重新安裝後,Android 應用程序會記住其數據 - An Android app remembers its data after uninstall and reinstall

問題:

While developing an Android app targeting all versions above 4.1, I observed that uninstalling my app and installing it again does not clear its data.在開發針對 4.1 以上所有版本的 Android 應用程序時,我發現卸載我的應用程序並再次安裝它並不會清除其數據。

The app is designed to store the details that it asks in its first screen.該應用程序旨在存儲它在第一個屏幕中詢問的詳細信息。 After uninstalling and installing again in OS version 4.4.4, the app prompts the user to fill in the data, which is normal. 4.4.4版本的OS卸載重新安裝後,app提示用戶填寫數據,屬於正常現象。 However in version 6.0 the same install/uninstall sequence bring backs the data originally input.然而,在 6.0 版中,相同的安裝/卸載順序會帶回最初輸入的數據。

I tried to ensure by visiting /data/data/my package folder to see the database is gone after uninstalling and indeed that folder gets deleted during uninstall.我試圖通過訪問/data/data/my package folder來確保卸載後數據庫消失了,並且確實在卸載過程中刪除了該文件夾。

I tried to delete the app by visiting the settings page, through Titanium Backup and the results are same.我試圖通過訪問設置頁面,通過鈦備份刪除應用程序,結果是一樣的。 The device is rooted Nexus 5 running v6.0.該設備植根於運行 v6.0 的 Nexus 5。

What could be the reason for this strange behavior?這種奇怪行爲的原因是什麼?


解決方案:

參考一: https://stackoom.com/question/2FAvq
參考二: An Android app remembers its data after uninstall and reinstall
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章