public class TiltWriterActivity
extends Activity
TiltWriter |
In all, there are 13 setup parameters, organized in ten spinners, one text field, and two checkboxes. The setup parameters are explained as follows.
Parameter Description Participant Code A code to identify the user being tested. In experimental research, a user is typically called a "participant".
Session Code A code to identify the session. This code could be used in an a longitudinal experiment, where participants are tested over multiple sessions. Each session might involve an hour of testing, with one session per day over multiple days.
Block Code Note: There is an inactive setup parameter for "Block code". The block code is generated automatically by the software.
Group Code A code to identify the group. If the experiment uses a within-subjects design, participants are usually assigned to groups. This code identifies the group. This procedure is known as counterbalancing, which is used to offset order effects. (See section 5.11 in the course's Suggested Readings for complete details.)
Condition Code A code to identify an external condition. This setup item is an editable text field. Tap to popup an input method editor to change the value. The condition code is useful if the experiment included an independent variable pertaining to an environmental condition or a context of use. As an example, an experiment might include "mobility" as an independent variable with levels "sitting" and "walking". The code "Sitting" might be used for the sitting condition and the code "Walking" for the walking condition. These codes appear in the output data to facilitate analyses. BTW, an example of an experiment using this independent variable is described by Fitton et al. in Exploring Tilt-Based Text Input For Mobile Devices With Teenagers.
Phrases per Block The number of phrases entered for each block of testing.
Phrases File A file containing phrases of text that are selected at random and presented to the user for input. The following options appear:
- phrases2 - a collection of 500 phrases (no punctuation)
- quickbrownfox - the phrase "the quick brown fox jumps over the lazy dog"
Note: The actual phrases are in files in
/res/values/
.
Keyboard The keyboard to use. The following options appear:
- phone - a phone keypad
- qwerty - the standard qwerty layout
- custom - a custom keyboard (see below)
Tilt gain A value from the set { 10, 25, 50, 75, 100 } roughly corresponding to gain sensitivities ranging for very low to very high
Dwell time A value from the set { 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 }. The values sets the duration in milliseconds that the ball must remain inside a key to select the key
Sensor sampling rate A value from the set { Normal, UI, Game, Fastest } to set the sampling rate for the device sensor. See Demo_Sensors for further details. Vibrotactile feedback A checkbox item. If selected, enables a vibrotactile pulse to be emitted on each key selection Auditory feedback A checkbox item. If selected, enables an auditory click to be emitted on each key selection
To begin entering text, the virtual ball must be positioned in the green square for one second. When this occurs, the program transitions to an experiment screen featuring the selected keyboard. Example images are shown below for the phone keypad:
As entry proceeds, candidate words appear in fields above the keyboard. A word may be entered early by selecting the candidate word. Additional keys include a Backspace key, to erase keystrokes, and an Enter key, to complete entry of a phrase.
The phone and custom keyboards are ambiguous, since each letter key bears more than one letter. Because of this, it is possible that the desired word does not appear, even when all the letters are entered. In this case, there is a "next" key to advance to the next group of candidate words for the ambiguous key sequence. This behaviour is rare, but it will occur occasionally for uncommon words that collide with common words.
Since keys are selected when the ball remains inside a key for the dwell-time duration, there is the potential for inadvertent selection. This is the so-called "midas touch problem". To avoid this, the user must keep the ball moving from key to key or position the ball in the gutter – the region around the keyboard. The gutter, then, provides an opportunity for the user to rest or pause during entry.
After a phrase is entered and the user selects Enter, results appear. An example is shown below.
The data in the sd2 files are comma-delimited to facilitate importing into Excel or a statistics application for follow-up analyses. An example is shown below for the data in the sd2 file above.
Modifier and Type | Class and Description |
---|---|
class |
TiltWriterActivity.ScreenRefreshTimer |
Constructor and Description |
---|
TiltWriterActivity() |
Modifier and Type | Method and Description |
---|---|
void |
doEndOfPhrase() |
void |
doNewPhrase() |
int |
getDefaultDeviceOrientation() |
java.lang.String |
getMinimumKeystrokes(java.lang.String word,
boolean mode,
int wordListSize,
EncodedWord[] ew) |
int |
getMinimumKeystrokesPhrase(java.lang.String phrase,
int wordListSize,
EncodedWord[] ew) |
int |
getWordPosition(java.lang.String word,
java.lang.String[] list) |
protected float[] |
lowPass(float[] input,
float[] output,
float alpha) |
void |
onAccuracyChanged(Sensor sensor,
int accuracy) |
void |
onConfigurationChanged(Configuration newConfig) |
void |
onCreate(Bundle savedInstanceState)
Called when the activity is first created.
|
protected void |
onPause() |
void |
onRestoreInstanceState(Bundle savedInstanceState) |
protected void |
onResume() |
void |
onSaveInstanceState(Bundle savedInstanceState) |
void |
onSensorChanged(SensorEvent se) |
void |
onStop() |
void |
onWindowFocusChanged(boolean hasFocus) |
static float |
wpm(java.lang.String text,
long msTime) |
public static float wpm(java.lang.String text, long msTime)
public void onCreate(Bundle savedInstanceState)
public void onWindowFocusChanged(boolean hasFocus)
protected void onResume()
protected void onPause()
public void onStop()
public void onAccuracyChanged(Sensor sensor, int accuracy)
public void onSensorChanged(SensorEvent se)
public int getDefaultDeviceOrientation()
public void doEndOfPhrase()
public void doNewPhrase()
public int getMinimumKeystrokesPhrase(java.lang.String phrase, int wordListSize, EncodedWord[] ew)
public java.lang.String getMinimumKeystrokes(java.lang.String word, boolean mode, int wordListSize, EncodedWord[] ew)
public int getWordPosition(java.lang.String word, java.lang.String[] list)
protected float[] lowPass(float[] input, float[] output, float alpha)
public void onConfigurationChanged(Configuration newConfig)
public void onSaveInstanceState(Bundle savedInstanceState)
public void onRestoreInstanceState(Bundle savedInstanceState)