android – Download file using react native


I have an Android app that when running it accesses a file and lists some information on the screen.

The point is that it only works if you have internet.

What I need is to download the information and save it to the device to be accessed offline.

How should I do?


Have you tried using AsyncStorage?

To save the information:

AsyncStorage.setItem("chave", "valor");

To recover:

AsyncStorage.getItem("chave").then((value) => {
    // salvar no "this.state".
    this.setState({"chave": value});


Scroll to Top