Clear the app data programmatically in android
Clear the App Data Programmatically in Android Application data has been created due to use shared preference data, databases and network caches data. This data has been manually clear on Settings -- > Apps (or) Application Manager --> Select the app you want to clear the data. --> Then click button clear data to erase the app from the Phone and SDCARD. Applications like facebook, google+, gmail and some games captures more data on phone and SDCARD. Once you clear the data of your app, all passwords and saved settings in app has been lost. So carefull to use this method. Create the Class MyApplication public class MyApplication extends Application { private static MyApplication instance; @Override public void onCreate() { super.onCreate(); instance = this; } public static MyApplication getInstance(){ return instance; } public void clearApplicationData() { File cache = getCacheDir(...
Comments