How To Authorize My Android App To Upload Data To Google Bigquery In A Background Task?
Solution 1:
Re: "It is possible to use Google BigQuery to store my big data collected by my Android app?"
Yes. BigQuery can load quite a lot of data at a time (up to 1 Tb), and it is possible to run up to 10,000 load jobs per project, but essentially, loading data into BigQuery is a batch process. Therefore:
Method 1: Create a web-based application to collect data from your Android app via a RESTful API. Then, at intervals (daily? hourly?), move newly collected data into Google Cloud Storage. Finally, kick off a BigQuery ingestion job to ingest the recently collected data into BigQuery from Google Cloud Storage.
One way to build the first part is to use the App Engine Datastore to collect data from your Android application. It's possible to use the new Datastore Admin backup to BigQuery feature to load your collected data into BigQuery for analysis.
Method 2: You can use Android's AccountManager class (see tutorial here) to authorize access to the BigQuery API, and then use a direct POST request (using a multi-part mime request) to add data to a BigQuery table. This flow requires the Android app user to authorize access to the BigQuery API when using the app.
Post a Comment for "How To Authorize My Android App To Upload Data To Google Bigquery In A Background Task?"