-
Notifications
You must be signed in to change notification settings - Fork 5
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
Comments
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 |
@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? |
@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. |
Ok, yes, understood. So, would be great to implement that in the app. Cheers! |
@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. |
@mananwason agree. Please proceed. |
@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 :) |
The version sheet was not in use till now @batraabhishek. It was just being used to fetch urls of other sheets. |
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.
The text was updated successfully, but these errors were encountered: