Search code examples
androiddatabasesqlitegoogle-sheets-apigoogle-drive-android-api

Android Programming With Google Sheets


Good Morning Stackoverflow Community,

I have been working on a Android Application and currently running into a heap load of problems.

Scenario: I need to push and pull data to a Google Spreadsheet, but here is the issue, this application will only be deployed to about 10-15 10in tablets. Now the application is a estimating app for technicians, however when the techs are out in the field they will not have a data connection because the tablets are WiFi only. The only time the app will be able to connect, is when they meetup in the morning at the office and sync the application, to ensure that the data can sync to Google Sheets via Google Drive and Android.

So what I was thinking about doing is taking the initial spreadsheet, convert it to a sqlite db and have the application populate the data fields locally from the device, then when the estimate is completed, somehow turn that data retrieved in the app back to a Google Spreadsheet and saved to the device. (Is this possible, and if so where can I find information on converting data from a sqlite db into a Google Spreadsheet).

Then when the tech gets back to the office where there is a data connection, sync the newly created sheet to Google drive, so the administrator can manage what he needs to manage.

I have searched and searched but can not wrap my mind around this, so any help would be beneficial.

Another issue is that, since there is no data connection to the device when they are performing the estimate, the Google Plus login, that we implemented will not work when out in the field, so would I also need to make a local login procedure that the sqlite db can handle?

Thanks In Advance.

Will


Solution

  • Can you install Google Sheets app on the device? If so, you might not have to make things so complicated. Here, you can see that Google Sheets are also available offline if you have the app installed. So all they would need to do is, work on the spreadsheet when they are out on the field, come back to office and sync it the next morning. Wouldn't that possibly solve all your problems? Please let me know if I missed something but from what I understood, this should be enough.