Fetch Preload Content

If you want to pass over data inside the cache, you can fetch the content directly using fetchPreloadContent method. A specified data will be fetched from the server, saved inside the cache, and returned in onSuccess method.

  • UserCom.getInstance().fetchPreloadContent("example_content", new PreloadContentCallback() {
        @Override
        public void onSuccess(PreloadContent content) {
            // Do whatever you want
        }
    
        @Override
        public void onFailure(Throwable throwable) {
            // Something went wrong, maybe you should try again?
        }
    });

The onSuccess method will return the data (preload content).