Downloadable surveys
pmagnuson opened this issue · comments
We are looking into adding this to an existing Flutter app.
- Really happy that you selected Flutter
- This looks like a great contribution to the community for serious research.
Has any thought gone into making the surveys a downloadable resource from a server?
- admins could change the surveys on the fly
- changes to surveys would not require an app update.
Thanks,
Hi @pmagnuson - thanks for your interest in RP.
As for your question, RP supports JSON serialization. All the survey classes (RPTask, RPStep, etc.) all contains the toJson
and fromJson
methods, making them serializable on the fly. This can be used for downloading a survey from a server.
We use this ourselves in our CARP Studies app, which is an app that can download a study configuration (incl. surveys) and show this to the user.
The app is a little complicated (and not really documented yet), since it relies heavily on the CARP Mobile Sensing Framework. But it basically downloads an RPTask
object for each survey and shows it to the user.
Note also, that all the RPResult
classes has a toJson()
method, which allow you to upload the results back to the server (or save it on the phone).