Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App should start with last version on startup #9

Open
mariobehling opened this issue May 9, 2015 · 8 comments
Open

App should start with last version on startup #9

mariobehling opened this issue May 9, 2015 · 8 comments
Assignees

Comments

@mariobehling
Copy link
Member

The current app reloads a new program every time it restarts. This makes the start of the app very slow. Also, it means that the app cannot be used offline.

@batraabhishek
Copy link
Contributor

I think I should give some clarifications here in case someone is not clear with the version that is followed in Google Docs and OTS app. In google docs (spreadsheet), under track sheets we have a column named version. The organizer (@mariobehling) must increment the value every time any particular track is updated.

From the app side ( @mananwason ) store the app version in shared preference (isolated app storage). JsonToDatabse downloads the Track sheet first, so check the version stored in device with the version returned by Google Spreadsheet, if there is a difference in version number (for any track), then download that track sheet only (with difference in version), update the database and and also the version stored in shared preference. In this way we will be downloading only the tracks that are updated, no need to update whole data even for small change. Thus it makes downloading fast. I planned this for FOSSASIA, you can also implement your own version-ing system in spreadsheet. :)

EDIT
Versioning sheet returns the version for each track, and also the venue

@mariobehling
Copy link
Member Author

@batraabhishek Well, actually, in the current process I am simply updating the existing sheets, cause the table head was changed in the app spreadsheet and I was not sure, if that has an influence on the functioning. So, currently, I am indeed updating the same sheet continuously instead of importing the sheets as I have done it with FOSSASIA. Should I revert to the former way. Will everything be still working?

@batraabhishek
Copy link
Contributor

@mariobehling Changing table head can disturb the parsing of the spreadsheet. Changing table head will require small code change but can take time to debug. So we can fix that for once, after that you will be able to import sheets. Even if you are changing any sheet manually you should increment the version for that sheet ( in order to reflect changes in the app) For example if you change something manually in Kids Maker Space sheet, so you will have to update the version from 1 to 2 in Versioning sheets. On the next launch app compare the version, it will find a diff in version for KidsMakerSpace, so it will download this sheet again and update database.

@mariobehling
Copy link
Member Author

Ok, yes, understood. So, would be great to implement that in the app. Cheers!

@mananwason
Copy link
Member

@mariobehling @batraabhishek Sorry for being a little late. We can keep a versions sheet for every kind of data we have. First, we can check that sheet and see if version is same or not. If it is lower than current version, we can call respective functions in the JsonToDatabase class.

@mariobehling
Copy link
Member Author

@mananwason agree. Please proceed.

@batraabhishek
Copy link
Contributor

@mananwason Yup, there is already a version sheet for every track. https://docs.google.com/spreadsheets/d/1NY3YC1AWC8xotzD2X0dMZuBSGS5ErjEtkYboGwKuZWc/edit#gid=1847379562

For sponsors, need to figure this out, in case you are following this.method :)

@mananwason
Copy link
Member

The version sheet was not in use till now @batraabhishek. It was just being used to fetch urls of other sheets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants