I visualize my app's data using google charts in the html file kept in assets folder of my android app. The html file is loaded in android WebView.
I use Firebase Cloud Messaging to silently update my android app's data.
Since the app needs to work offline too i need to persist the data. I can save it in shared preferences but i don't see a way for my javascript in html file to read android's shared preferences.
So, when the payload is received i want to update a .json file (in the assets folder) and wondering how to go about.
JSON:
[[a,b,c] , [1, 12, 24], [2, 45, 46]]
Payload:
[[a,0,1,53]]
Updated JSON:
[[a,b,c], [53, 12, 24], [2, 45, 46]]
first element in the second array is updated from 1 to 53
Thanks ^_^