2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
In Android, multae sunt modi ad tollendam datam quae intus servatur in app. Haec notitia condi potest in SharedPreferences, SQLite databases, fasciculi (including files cache), seu Content Providers. Hic sunt modi communes paucae ad hanc notationem tollendam:
SharedPreferences:
Ad omnes notitias delere potes simpliciter vocare in SharedPreferencesSharedPreferences.Editor.clear()
modum et mutationes tunc committere.
- SharedPreferences sharedPreferences = getSharedPreferences("your_prefs_name", MODE_PRIVATE);
- SharedPreferences.Editor editor = sharedPreferences.edit();
- editor.clear();
- editor.apply(); // 或者使用 editor.commit();
SQLite database:
DELETE
SQL editio.Context.deleteDatabase(String name)
modum.documentum:
Apps files in repositione interna vel externa ad notitias servandas creare possunt.Ad haec delere potes uti filesFile.delete()
modum.
- SharedPreferences sharedPreferences = getSharedPreferences("your_prefs_name", MODE_PRIVATE);
- SharedPreferences.Editor editor = sharedPreferences.edit();
- editor.clear();
- editor.apply(); // 或者使用 editor.commit();
Context.deleteCacheDir()
ut totum cache presul delere.Contentus Suggero:
Uninstall app:
PackageManager.uninstallPackage(String packageName)
(Sed nota quod haec methodus plerumque solum operatur pro apps vel apps cum permissionibus specificis).Patet data in app:
Usus Android Studio ADB Tools:
adb shell pm clear <package_name>
) Ad purgandum app data.Utere "Free Data" button (in occasus):