Saving Android application data in Google Cloud

2019-03-18 06:48发布

问题:

Is it possible to save Android application data in Google Cloud and sync with application while using app? E.g., I want Google Cloud Storage to act like a server for my application.

I want to create a folder in Google Cloud Storage and store all app related data there. I have read the Cloud Storage docs and created the API key. Please advise whether this can be done.

回答1:

You can use Google Cloud Endpoints to connect your mobile app to Google Cloud Platform:

One tool, multiple clients

Build client libraries for Android, iOS and web-based clients from one source. Cloud Endpoints wraps your code to build an API server in just a few steps. Cloud Endpoint API libraries are available in Java and Python. Learn more about Cloud Endpoints in our documentation or just dive in and try our sample Tic Tac Toe web application.

Extending App Engine infrastructure

All of the tools and libraries made available in App Engine are now available to your mobile devices. Access Datastore, Cloud Storage and Task Queues using your App Engine backend with no extra work. Integrate OAuth 2.0 authentication quickly by following our examples.

If you're building an Android game, you can also use the Saved Games feature from Google Play Games Services.



回答2:

Every google service if it access any particular user's account information or service then it has to go through oauth authentication flow. I guess you require it to access google app engine services also. https://developers.google.com/accounts/docs/OAuth2

This might not be the full answer for your question. but it can set the ball rolling.