AugustanaCSC490Spring2015 / GradliciousVikingHub

0 stars 2 forks source link

Parse.com local caching #6

Closed ethantanner closed 9 years ago

ethantanner commented 9 years ago

Perhaps we should use the caching features of parse to store the building information instead of a shared preference. http://blog.parse.com/announcements/easy-caching-with-parse/

daviddevore11 commented 9 years ago

I have created a method in the MainActivity called updateLocalDataStore which will first, unpin any existing local data store of the old query, then query the "AcademicBuildings" table for all academic buildings and repin the new query to the local datastore. This will cause the user to always have the newest/updated information in regards to buildings. I also added the starts to a method called populateBuildingInfo which creates a query to the local data store to find the object that matches the buildingName variable, only pulling one element from the local data store which will contain all of that buildings information. Now all that is needed is to finalize the data in Parse and then add that to the list object. For some reason my test buildings I had in Parse where deleted and only residential buildings are in the table with no data. But once the parse data is sorted out we can easily populate the list view with using the query.