public class TiltMazeActivity
extends android.app.Activity
implements android.hardware.SensorEventListener
In all, there are 12 setup parameters, organized in eight spinners and four 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.
Number of Trials The number of trials for the current launch of the application
Order of Control The options are
- Velocity – tilting the device controls the velocity of the virtual ball
- Position – tilting the device controls the position of the virtual ball
Gain A value from the set { Very low, Low, Medium, High, Very high } roughly corresponding to gain sensitivities ranging for very low to very high.
Show Nominal Path A checkbox item. If selected, a light grey line appears showing a nominal path through the maze, from the start circle to the end circle. The nominal path proceeds through the middle of the path through the maze.
Show Minimum Path A checkbox item. If selected, a light grey line appears showing the minimum path through the maze, from the start circle to the end circle. The minimum path proceeds along the shortest error-free path through the maze.
Show Wall Hits A checkbox item. If selected, red patches appear at each location where the ball hits the wall of the path when proceeding from a position inside the path.
Sound Alarm on Wall Hit A checkbox item. If selected, an audio alarm sound is emitted each time the ball hits a wall when proceeding from a position inside the path.
After the setup parameters are set, the program is launched by clicking the OK button. The following screen appears:
The goal in TiltMaze is to control the movement of the virtual ball using device tilt. Each trial begins by positioning the ball inside the green start circle for one second. After doing this, an auditory beep is heard and the start circle turns grey. The end circle at the opposite corner of the display turns green. The user's task is to manoeuvre the ball from the start circle, through the maze, to the end circle. Doing so without hitting a path wall is an error-free trial. The user should proceed as quickly and accurately as possible.
Depending on the experiment conditions and other factors, user performance will vary. Some users will be fast, some slow. And all users are likely to hit a path wall on occasion. Feedback is critical. When the ball hits a path wall, a vibrotactile pulse is emitted. An auditory alarm and visual indication may also occur, if the corresponding setup parameter was selected. The following figure shows the red patches indicating wall hits (dashed line added):
At the end of a sequence of trials, results appear in a dialog. The results include the data on four user performance variables (aka dependent variables). These are
An example results dialog is shown below.
Note that movement efficiency is most meaningful for error-free trials. For such trials, perfect movement yields a movement efficiency of 100% and imperfect movement yields a movement efficiency < 100%. For trials with wall hits, movement efficiency can exceed 100%, for example, if the user just moved the ball directly from the start circle to the end circle, smashing through the walls.
The data in the sd2 file are comma-delimited to facilitate importing in 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 |
TiltMazeActivity.ScreenRefreshTimer |
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
Constructor and Description |
---|
TiltMazeActivity() |
Modifier and Type | Method and Description |
---|---|
int |
getDefaultDeviceOrientation() |
protected float[] |
lowPass(float[] input,
float[] output,
float alpha) |
void |
onAccuracyChanged(android.hardware.Sensor sensor,
int accuracy) |
void |
onCreate(android.os.Bundle savedInstanceState) |
protected void |
onPause() |
protected void |
onResume() |
void |
onSensorChanged(android.hardware.SensorEvent se) |
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDestroy, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onMenuItemSelected, onMenuOpened, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPictureInPictureModeChanged, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRequestPermissionsResult, onRestart, onRestoreInstanceState, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSaveInstanceState, onSearchRequested, onSearchRequested, onStart, onStateNotSaved, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, attachBaseContext, getAssets, getResources, getTheme
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
public void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class android.app.Activity
public int getDefaultDeviceOrientation()
protected void onResume()
onResume
in class android.app.Activity
protected void onPause()
onPause
in class android.app.Activity
public void onAccuracyChanged(android.hardware.Sensor sensor, int accuracy)
onAccuracyChanged
in interface android.hardware.SensorEventListener
public void onSensorChanged(android.hardware.SensorEvent se)
onSensorChanged
in interface android.hardware.SensorEventListener
protected float[] lowPass(float[] input, float[] output, float alpha)