FileStudyProtocolManager
A StudyProtocolManager that loads and saves SmartphoneStudyProtocols as JSON files on the phone.
The path and filename format is given by filename.
- Implemented types
Constructors
FileStudyProtocolManager
Methods
filename
The path and filename of the protocol with studyId, on the format
<localApplicationPath>/protocols/protocol-<study_id>.json
getStudyProtocol
- String studyId
override
Gets a SmartphoneStudyProtocol based on its id. Returns null if no protocol exists.
initialize
Logs the protocol file path. No other setup is needed.
saveStudyProtocol
- String studyId,
- SmartphoneStudyProtocol study
override
Saves study as JSON to filename. Returns true if successful.