chat-health / chat.android

Android app for the CHAT project
GNU General Public License v3.0
2 stars 3 forks source link

Download videos and PDFs instead of requring adb push #9

Closed mackrauss closed 9 years ago

mackrauss commented 9 years ago

Right now the app relies on the PDFs and videos being put into the /sdcard/chat folder. This is OK for mass installation and in situations where networking is limited or not available.

However, the app should offer the ability to pull PDFs and videos form the server and install them in the correct place.

This sync should be done via SyncAdapter or AsyncTask and only if a WiFi connection is available.

Questions is if the user should trigger this sync or if it should happen automatically.

Lastly, we might want to offer the ability to change the URL for the video resources in setting to allow a local pull from a laptop in order to speed up the process.

mackrauss commented 9 years ago

Fixed with commit afc3e95e0a4ffc19c2a64bc320cd09eba73f158e and some previous commits. The app now creates /sdcard/chat if necessary and then downloads everything that is listed by the backend when querying https://backend.lmbutler-ssa.net/assets. This happens in the sync adapter, so it is asynchronous and is only triggered if connected via WiFi