Local Storage

The Local Storage module was created to provide our access to the device local disk.  The following article will describe how to use app local cache.

What files can I save / load from app local cache? - Any files you want.

Are those files will be available on other user devices? - No. Files you save locally are only available on the current device. 

Is it better to use the standard Unity Player Prefs- It's a bit different, both systems are served the same purpose. But Player Prefs is like a big Dictionary file. And all of your records are stored in the same file. With Android Native local cache API each key is a different file, which means that Player Prefs suits better for saving small Key / Value records. But if you save big data files or images locally, you should do that with this API.

Save data

You can save simple strings (feets greater for big JSON files data), byte[] (feets for any file type) and textures. The code snippet below will demonstrate how to save that data type to a local app storage

AN_Storage.Save ("TEST_KEY", "Some String");

Texture2D image = GetTexture();
AN_Storage.Save ("TEST_IMAGE_KEY", image);

byte[] data = GetData();
AN_Storage.Save ("TEST_DATA_KEY", data);

Load data

You can easily load any data you've saved earlier. See the code snippet below:

string val = AN_Storage.GetString ("TEST_KEY");
Texture2D cachedImage = AN_Storage.GetTexture ("TEST_IMAGE_KEY");
byte cachedData = AN_Storage.GetData ("TEST_DATA_KEY");