Creating cloud storage for android app - android

I am creating an android app for university which has cloud storage so when the teacher sends a note the student can view it without download it
I want to know if their is any book or tutorials for creating your own cloud storage for android

You will want to use Google Cloud Storage to store your data. To learn more about GCS, you can check this link.
You will need to have a Google Cloud Storage bucket tied to an App Engine application you are going to develop. From your android code, you will want to call the Cloud Endpoints API for your application to retrieve the data from GCS.
For more info about Cloud Endpoints for Android, you can check this link.

Related

Android Sensor data to Cloud pubsub

Background
I have a sensor "A" which connects to my mobile app over Bluetooth. This sensor generates 512 data points per seconds.
What I need
I need to send send this data to Google BigTable via Cloud pub/sub. I have already created a topic and I can push message to the topic.
What is the problem
This answer says that I need to create an app engine and connect my app to that app engine. The app engine will receive the data and send it to Bigtable via pub/sub and dataflow.I get this, but now I have two sub problem here -
a. How can stream the data from my mobile app to app engine? Websocket? Because I think I can't do simple post request to post the data to a route (/publishdata), Am I correct?
b. I am authenticating my user on mobile app via firebasea authentication. Can I validate my user on app engine via firebase-admin sdk? I can do that by passing the tokenId but is it the correct method? or can I use firebase to authenticate my users on app engine?
I have seen projects where people are suggesting to create a service account and add it into the app. The problem is I don't want to expose my credentials to client. Another talk
Can anyone suggest me tackle this problem?
Thoughts that I have
I can send data to firebase realtime database and then thinking of moving that data to Bigtable via pubsub or cloud function. I couldn't find any example of an app engine connecting to a firebase and reading data from realtime database. I thought in this example this guys sending data to Realtime database and then using pubsub to move data into Bigtable. If this is possible then can I authenticate my user on the app engine via firebase-admin sdk?
Firstly, you should take a look for this Build an Android App Using Firebase and the App Engine Flexible Environment article, which demonstrates how to write a mobile app with backend data storage, real-time synchronization, and user-event logging using Firebase.
Regarding to your first question about sending data to App Engine, you can send it as an HTTP POST. Please, take a look to following questions on Stackoverflow: 1, 2.
With reference to create a service account and add it into the app, it's not secure option. In this case, you can use Callable Cloud Functions. Refer to this Stackoverflow thread.
You can get data out of the Firebase Realtime Database via backup service which allows for exporting data to GCS Bucket. Then, you can move it to Bigtable, by using open-source Dataflow templates, for instance Cloud Storage Avro to Bigtable. Please, refer to official documentation, to find more about exporting data to Bigtable.
I hope it helps.

Deploying database on Google Cloud Storage in Android application

In my android application I want to store images from my Android application to Google Cloud Storage. For that I'm referring to this Mobil Backend starter example. In that they have a backend database which is deployed on Google Cloud Storage, but I don't know I can deploy my own database there.
What are the steps to query the database in my android app? Please help me to implement this functionality. Can anyone suggest a tutorial or link which provides proper guidelines for using and storing DB on Google Gloud?
Thank you.
If you are writing your own App Engine application that needs to use storage, you have several options in the Google Cloud:
The Mobile Backend Starter using the Datastore API, that provides a NoSQL like datastore in the Google Cloud that your App Engine application can interact with via the Datastore API. By default you get a total of 1GB of space in the free tier, after which you have to pay per use for your storage requirements.
There is the Cloud Storage API, that allows you to save objects to Google Cloud Storage Service. This service is analogous to Amazon S3 service and you can save your data, classified into groups i.e. buckets. This is a paid service. Refer to https://cloud.google.com/products/cloud-storage/
If you prefer to deal with SQL, you can look at Google Cloud SQL, which gives you a MySQL Instance in the cloud. This is a paid service too. Refer to https://developers.google.com/cloud-sql/
Finally, if you application prefers that you use the Google Drive account of the User itself, then you can look at directly integrating with Google Drive API. Recently Google introduced good updates to their Android Drive API. https://developers.google.com/drive/android/
In all the above cases, when it comes to interacting with the App Engine application, it is advisable that you expose the Data Services via a REST like API in your App Engine application.
Using Google App Engine allows you to setup a local Datastore for testing. When you deploy your App Engine code, it will create the same Datastore on App Engine too [without the data]. Basically, if you follow the steps in the link you have mentioned it will setup Eclipse and App Engine, the App Engine service does not run inside your Android ecosystem. It can be modelled as a REST based URL server, where you can define Endpoints as mentioned here: Java GAE
As for tutorials: Default Google Docs!
I have a full app here, almost full application! Sample App

How to store data in cloud and How to access data from cloud by using HTTP api?

Sorry for my English(I am not good in english please excuse).
I am working as a android application developer.I try to developing one application with backend support that means i want to use (web services) inside of the application.For that one i am trying to use google cloud for storing my data and access that data in json formt.It is possible to use that cloud data inside of my application.
For storing data in cloud they charge me something?
Please any one help me experts....
Thanks in advance...
At the onset, what you are trying to do is possible within App Engine. To summarise, you want to access some of your data that is stored using one or more of the available choices in the Google Cloud Platform and expose that over a Web Service running in your App Engine app.
When it comes to exposing your existing functionality over REST+JSON, Google Cloud Endpoints is a great way to get started, though nothing prevents you from rolling out your own.
For storage, there are several options and while you need to be mindful of the quotas/pricing, a great deal depends on which mechanism you want to employ as far as your storage API is concerned
Google Datastore API and Blobstore : The Google Datastore API is a non-relational database. The Blobstore is for storing large amounts of data (think images/videos). You have a free quota of 1GB for Datastore and 5GB for Blobstore within your App Engine application quota.
Cloud SQL : If you want to use a relational database , you can use Google Cloud SQL too. The pricing is mentioned on the page.
Google Cloud Storage : This is another storage option available with a Java client API. The pricing is mentioned on the page.
Google Drive : If your application is more of a personal nature and you wish to store some data within a Google Drive account of the user, you could look at that too.
Keep in mind that all these options are available as part of the Google Cloud Platform.
Hope this helps.

accessing cloud storage directly from an android application

I am creating an android application which needs to have a cloud database. I want to use google cloud storage which can act as a database for me. But I do not want to create a backend (Server Side) to retrieve my information. Instead I want to directly retrieve the information on the mobile client.
Is it possible? How can I achieve such a mechanism and what do we call it? Are there any links/tutorials to follow? The one so far I was able to find was the one in which I have to use app engine for my back end.
Thank you!
You can purchase only database service with either Amazon Web Services or Windows Azure.
A link with explanations about the different DB services can be found here:
http://aws.amazon.com/running_databases/
Instructions on how to use amazon database can be found here:
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Welcome.html#Welcome.Interfaces
Also, Windows Azure have a database service. Explanations can be found here:
http://www.windowsazure.com/en-us/services/sql-database/
Instructions on how to use Azure database can be found here:
http://www.windowsazure.com/en-us/develop/net/how-to-guides/sql-database/
Both database and cloud providers allow you to access the database directly using REST.
Hope this helps!
You can try Google Cloud save or Google Drive SDK.
Cloud save is useful for game apps to save small amount of data such as the current score of each user, level progress in a game and so on.
Google Drive SDK is designed to meet a large range of developer needs like sharing files with other users, managing a set of multiple files and subdirectories, add and reply to comments and so on.

Google Cloud Datastore access from Android

I'm trying to use Google Cloud datastore as remote data collector of a bunch of sensors, connected via an android Smartphone.
Firstly I'm trying to make it working in standard java.
The question is if it is possible to access Datastore directly from an android App of I need to build a GAE app that interact with the datastore.
I read for a while the documentation about the google api, but it is not really clear, how to use the Oauth 2.0 protocol.
Thank You all
You can use the oath2 support built into android as long as every user of the app is an admin of your google cloud project/app engine app. If you want to allow untrusted users to upload data, you would have to use your own endpoint and authentication strategy.

Categories

Resources