So I'm trying to set the app up so if the app is unable to connect to a network connection, then it will load the values from a .json file.
Am I on the right track and what will be the best way to achieve this?
The Set response code is for testing at the moment that the offline version works.
If the json files content can be channelled into the api_results variable, that would make this easier
So it will read the json via and pipe the content into this api_results variable to continue to be used through the app without the need to create a whole to block code to process the offline json file compared to polling the API
That's what I'm thinking I want to do but if there is a better way to do it, please let me know.
I'm still learning all this.
Json can be fixed only if data is edited and saved as file in assets otherwise if used online it is full of uriEncode characters because of API. An example