-
Notifications
You must be signed in to change notification settings - Fork 11
RemoteActivity
RemoteActivity essentially allows for the creation of a customized prompt written specifically for a campaign.
- Write an android application with at least one activity which returns a JSON object with at least one key, 'score', whose value is a double.
- Specify the prompt in your campaign XML as defined in the Campaign Definition Page
- Install the android application you wrote along with ohmage on the phone.
Here is an example remote activity which always returns '0.0' when it is run:
``
Here is the prompt specification in the campaign xml
<prompt> <id>AttentionGame</id> <displayType>event</displayType> <displayLabel>Attention Game</displayLabel> <unit>Score</unit> <promptText>Press the button below to play the game. To play, tap every letter except the letter 'X'.</promptText> <abbreviatedText>Attention Game</abbreviatedText> <promptType>remote_activity</promptType> <properties> <property> <key>package</key> <label>edu.ucla.cens.FocusGame</label> </property> <property> <key>activity</key> <label>edu.ucla.cens.FocusGame.Game</label> </property> <property> <key>action</key> <label>edu.ucla.cens.FocusGame.Game.LAUNCH</label> </property> <property> <key>autolaunch</key> <label>false</label> </property> <property> <key>retries</key> <label>10</label> </property> <property> <key>min_runs</key> <label>1</label> </property> </properties> <skippable>true</skippable> <skipLabel>Skip</skipLabel> </prompt>