Search code examples
androidparse-platform

Clear parse installation cache on Android


does anyone know how to clear the data from the parse installation on the newer library version 1.10? In 1.8 you could do it via reflection by calling clear from memory, like described in this answer: ParseObject mergeREST raise ConcurrentModificationException

I am deleting the parse installation from web, and I also need to clear the ram cache on the android phone and I can't find a way to do it. Any ideas?


Solution

  • Solved by making a package in my project named com.parse, in it I've placed a file named ParseEasyAccess.java , it contains the following method:

    public static void clearParse() {
      ParseInstallation.getCurrentInstallationController().clearFromDisk();
      ParseInstallation.getCurrentInstallationController().clearFromMemory();
    }
    

    You can call this from anywhere in the app and it will clear all the parse installation data from RAM & disk.