Use Google Cloud Storage with GCS Library on Android - android

I am trying to figure out how I can use Google Cloud Storage in my Android Application via the Google Cloud Storage Library.
So far I already use the appengine datastore to save some user data. However, to store images I want to use the Google Cloud Storage but I wasn't able to get it to work yet.
The official google "Getting started" does not really help and I can't find any other proper tutorial that tells me how this is done.
Can somebody please explain the basic steps that are needed or recommend a tutorial that works for using on android?
Thank you very much in advance!

Related

How to upload an image to Google Cloud Storage in Android App

I am attempting to use Google Cloud Storage to store images for an Android Application I'm building. I'm a beginner with cloud stuff but I've already set up an endpoint to store structured data in the google cloud datastore and I'm using app engines standard environment.
I've read conflicting things about how to go about this but I'm currently using this guide: https://cloud.google.com/storage/docs/object-basics#storage-upload-object-java and trying to do it in the endpoint I've already set up. I did try to use the library directly in the app however trying to run with the dependency for it caused the app to crash on startup.
The guide I'm using doesn't talk at all about setup like how to get a bucket object of a given name (I've found how to create one but I want to use my apps default bucket which already exists).
Questions:
1) Is doing it in the endpoint the best approach? I want the simplest possible solution so I don't really want to use an extra thing like firebase if I can avoid it
2) For whatever solution is the best, can you give/link me a comprehensive explanation of how to hook it up starting from the Uri I get from the FilePicker all the way to uploading it to GCS? I've found so many explanations which explain part of the process but they don't fit together.
https://github.com/TdevM/FirebaseStorageTest/blob/master/app/src/main/java/tdevm/storagetest/ui/GalleryActivity.java
Here's my test project which i created to upload images on Firebase Storage. Firebase Storage is based on Google Cloud Storage.Comment back if it helped !
If google drive app is installed on the device where your app runs you can simply use intent `ACTION_CREATE_DOCUMENT to create a file in the cloud.

Integrating Google Cloud Storage in an Android app

I have spent over 2 days reading over the documentation over at Google Cloud Platform to find out how to hook up my Android app to my Google Cloud Storage.
I don't know if it's just the documentation that's just bad or my lack of understanding but I have really not gotten any closer in implementing this. By contrast I remember it took me a couple of hours implementing Amazon S3 support in an earlier Android project so I'm not a complete idiot.
My requirement:
Upload images to my GCS account
Questions:
Is there a simple "Hello World" type of example for hooking up an Android app to GCS?
I don't need access to users data so does that mean that I don't need OAuth 2.0?
Thanks
You need to use app engine and can use cloud end points to build your application. Detail procedure for creating android app and using app engine as back-end are described here and here

Any free SDK to store and return data?

I am looking for very simple data storage and retrieval from cloud. A solution something like the Evernote API.
I dont want to use Amazon or Google App Engine as I want to use easy to use SDKs to retrieve data rather than writing my own web Services.
Any suggestions please? This is for using in my Android app.
Apart from Evernote, I am able to find Dropbox also has API to store simple data and what I am looking for. I totally wonder why no one tried answering me in spite of having Android tag. Not sure if something is wrong the way I asked.

Phonegap in Android and iOS - Suggestions for building an app from scratch

this is just for personal knowledge, I will really appreciate your comments. I wanna build an Android/iOS app in phonegap, basically it's a business listing app, each business listing will have this data:
Name
Picture
Address
Phone
Map Location [latitud,longitude] so I can use a Map API.
I want to have all the directory listings inside the app, so you can use it "offline" not the maps of course, for using the maps you must be online.
So my questions are:
Suggestions about how saving the data, which topics do you recommend me to read
Is there any way to buy/download maps of countries and put them on my app, so the user don't need to be online to check where is located the business listing.
Do you think it's a good idea to develop this idea with phonegap? or do you recommend another methods/frameworks ?
I hope it's clear, sorry for my broken english! :-)
You can use Sqlite Database to store the data. Please read the document provided in the link :http://docs.phonegap.com/en/1.7.0/cordova_storage_storage.md.html#Storage.
You can use Google Maps API during offline. But during online, you can use the PhoneGapAPI provided in the link :http://docs.phonegap.com/en/1.7.0/cordova_geolocation_geolocation.md.html#Geolocation
Yes, you can use phonegap as it is the bestway for your Application. For more information please go through the PhoneGap Documentation link:http://docs.phonegap.com/en/1.7.0/index.html
1.Save data in SharePreferences or sqllite.
2. Use google or bing maps api is more easy. It's expensive to get the local map data and update it.

Google Cloud Storage in an android app

I'm trying to put a text document with highscores inside a bucket on the google cloud storage. So far, so good.
Now I want my app to open this textfile in the bucket, check if there is a new highscore, adapt the file and write it back into the bucket.
I´m trying to find example code, since that makes more sense to me for understanding than the apis, but I´m not able to find it.
The answers I get are all, it´s just simple get and put callbacks, but since it ain't simple for me, I was hoping somebody has a link to an example for an android app using google cloud storage and reading and writing online.
I found this information, but would love to see an example for android in eclipse: http://code.google.com/intl/nl-NL/appengine/docs/python/googlestorage/functions.html
If I'm creating an app in Eclipse, can I use the bucket in the google cloud? Or don't I or future users have access to that bucket for read and write?
Look at the Google api client libraries for java. Google storage has a Json Api (currently in beta and you must email to get turned on). The client libs are fairly straight forward once you get your head around it. All google apis are accessed in the same manner. You can use the Android Tasks example to learn from and apply it to Google Storage Api.
http://code.google.com/p/google-api-java-client/wiki/APIs#Tasks_API
Since you want to change files, I would advise to use Google Appengine's Blobstore or either save images as BlobProperty in GAE. CloudStorage is more for static files, I believe.

Categories

Resources