daily pastebin goal
79%
SHARE
TWEET

Untitled

a guest Dec 19th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public void onClearData(View view) {
  2.  
  3.     try {
  4.         boolean isCleared = ((ActivityManager) getSystemService(ACTIVITY_SERVICE)).clearApplicationUserData();
  5.         if (!isCleared) {
  6.             Toast.makeText(this, "Not able to clear the data", Toast.LENGTH_SHORT).show();
  7.         }
  8.     } catch (Exception e) {
  9.         e.printStackTrace();
  10.     }
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top