Advertisement
Ankhwatcher

Android Delete Internal Cache

Jun 10th, 2011
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. Boolean clearInternalCache ()
  2. {
  3.     String[] cacheFiles = fileList();
  4.     if (cacheFiles.length > 0)
  5.     {
  6.         for (int i=0; i <= cacheFiles.length; i++)
  7.         {
  8.             deleteFile(cacheFiles[i]);
  9.             Log.i("InternalStorage", "Deleted: " + cacheFiles[i]);
  10.         }
  11.         return true;
  12.     }
  13.     else
  14.     {
  15.         return false;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement