android 2.2 data still exists after uninstall
I have an app using purely webview. I also stored some ids using Share开发者_JAVA技巧dPreferences.
I realised that even after clearing data, and uninstall, some data still appears to exist. because when I reinstall the app, the webviews which points to a login url, still shows the login id. only when I reset the device to factory default, then the login credentials will disappear.
is there something wrong here?
onDestroy of your activity wrtie this
yourWebView.clearCache(true);
yourContext.deleteDatabase("webview.db");
yourContext.deleteDatabase("webviewCache.db");
You are saving data into sharedpreferences which is stored in an xml file in /data/data/(package name)/shared_prefs directory. This data cannot be clear by clearing cache. To remove it, you have to be in your application and get SharedPreferences.Editor and call editor.clear()
and then editor.commit()
.
精彩评论