android - How do I access a text file from GCP Storage and parse it? -


i have app want make android. have decided store information display in text file , parse it, rather database since data simple.

the info 2 lines of text, word , short description of word. want app each pair (word, description) text file , display on card in app.

i stored .txt file in google cloud platform storage , need writing code access file(s) , parse them use in cards ui.

i can find no helpful examples of how file parse in app in smooth way.

you can use client library open file , read it. example, python client library @ https://cloud.google.com/appengine/docs/python/googlecloudstorageclient/functions

and code this:

import cloudstorage  try:   gcs_file = cloudstorage.open(filename, 'r', content_type='text/plain')   # process normal ... except cloudstorage.notfounderror:   pass 

sample java client code @ https://cloud.google.com/storage/docs/xml-api-java-samples


Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -