-2

Right now I have an android app that display a graph plot of data that is feed to it form Json file. Currently I have a json file in my asset folder from which I am fetching the data for the graph plot. But what I actually want is that:

I have a json file on cloud (GCP Bucket). I want to get that data from the json file or the json itself from cloud bucket and get it to the app so that graph plot can be made. The json file can be updated, hence the latest data will be fetched by the android app for the graph plot.

Please suggest me any method to do so?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Kundan Jha
  • 104
  • 3
  • 11

2 Answers2

0

Have you checked this documentation https://cloud.google.com/java/getting-started/using-cloud-storage

You can call the api using async task.

Or are you facing any specific problem calling the api?

There is also post regarding this How to read a file from Google Cloud Storage in Java

Sahil
  • 86
  • 2
  • 6
0

you can read and write any file on GCP Bucket in Android. just read file using this library in single line of code

https://github.com/pliablematter/simple-cloud-storage

after read json file you can write that file in your app storage if you need it to use later.

Community
  • 1
  • 1
Sahil Arora
  • 495
  • 1
  • 3
  • 11