How To Use Google Sheet As Database For Android App
I ve seen some of the tutorials but haven t successfully gotten it to work on an android phone.
How to use google sheet as database for android app. How to use a google spreadsheet as database. Follow the steps below to use google sheets app built using app maker appy pie tap open the app. File publish to the web. Go to google sheets and quickly create a blank spreadsheet. Go to sheetsu and login using your google account.
B fetch data from the sheet using google sheets api. I chose to go with jsonp and use the fetch jsonp library to manage this so there s no need for special measures. Tap app sheet. Has anyone successfully utilized data from a google spreadsheet in an app on android. Background google allows you to treat any public spreadsheet as a table in a database by using the google query language this language provides an easy way of interrogating a data source and pulling back the results of the query as json response or an html table.
Create a google spreadsheet with some data. This is what google app maker uses under the hood. As far as i can tell this lack of behavior is not documented anywhere but i ve found a number of people with the same issue. This example uses a google spreadsheet as database. Just 2 clicks click on create json api from sheetsu dashboard and paste the url of spreadsheet that you created in step 1.
Tap open your desired sub sheet. We use retrofit and okhttp client for handling the network requests and making the data meaningful. Publish the sheet to the web. So google sheets api will fetch results from the above sheet in the form of a json file format. Insert and select statements are more or less simple we use the web component and the post and get blocks for that.
Here you will see all the sub sheets terms and conditions privacy policy and logout option. Let s make our pojo. Note the document id from the url. To be able to update and delete i added some logic using google apps script see details below. The app needs to fetch the real time data of book availability.