Skip to content
Sabrina Thai edited this page Dec 3, 2018 · 12 revisions

**** DISCLAIMER: This wiki is still a work in progress. For missing pages, please refer to the original tutorial on the ExperienceSampler website. ****

Welcome to the ExperienceSampler wiki!

In this Experience Sampler customization tutorial, we will show you how to customize Experience Sampler's functions to meet your study needs.

After you've created your own Cordova app (see here for instructions on how to create your own Cordova app), all the changes you will make are to the JavaScript file in the www folder you see when you open your app folder. Click here for the Android JavaScript file and here for the iOS JavaScript file. Do NOT edit the www folder that is inside the platform > android or platform > ios folder.

When you run the cordova run or cordova build commands, cordova will copy the files from the www folder into the www folder in the platform > android or platform >ios folder.

In the HTML file, the only lines you need to be edit are lines 61-62; you just have to copy and paste the URL of your data collector in these lines. You can change the CSS file if you want to change the appearance of the app. (Please see this W3School's tutorial about CSS).

We have divided the customization procedure into five stages (see below). After completing each customization stage, you should test the code using the appropriate emulator. By dividing the customization process into stages, you will be able to identify errors in the code more easily. The functions included in each stage will also increase in difficulty; thus, the stages also scaffold the programming process, making it easier for people with no programming experience to become accustomed to the app development process. To help you move through the stages, we have noted which functions or parts of the function are used in which stages and have commented out the code that is not needed. You should uncomment parts of the JavaScript code as you progress through the stages. JavaScript comments are preceded by //. Blocks of code or specific parts of a line of code that are commented out are preceded by / and end with /. To uncomment the code, remove the comment indicators (i.e., // and /* */). If you are using a text editor designed specifically for programming or an IDE, you should look for a commenting/uncommenting command.

Learn how to customize your survey questions, end-of-questionnaire messages, and participant setup questions.

It's important to test your app after each customization stage. Learn how to test your app on a smartphone emulator.

In this stage, you'll learn how to set up your server and app to save your questionnaire data.

In this stage, you'll learn how to implement skip logic, question branching, and piped text for your questionnaire.

Implement a snooze function to remind participants to complete questionnaires at a later time if they are currently busy.

Schedule your signals for either a signal-contingent design (with random or fixed intervals) or an interval-contingent design.