public class TiltTargetActivity
extends android.app.Activity
implements android.hardware.SensorEventListener
In all, there are 14 setup parameters, organized in 12 spinners 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.
Sequences per Block The number of selection sequences for each block of testing.
Targets per Sequence The number of targets to select for each sequence. Targets appears as highlighted keys. Each target to select is chosen at random from the available targets.
Keyboard The keyboard to use. The following options appear:
- 3x5 - a portrait arrangement of 15 keys, somewhat like a phone keypad
- 4x10 - a landscape arrangement of 40 keys, somewhat like a qwerty keyboard
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
Tilt 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.
Dwell time A value from the set { 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000 }. The value 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
After the setup parameters are chosen, the program is launched by clicking the OK button. The following screen appears:
To begin selecting targets, 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 arrangement of targets. Figures appear below for the 5x3 (left) and 4x10 (right) arrangements.
The user selects targets by tilting the device to position the ball on a target and then maintaining the ball inside the target for the chosen dwell time. If the ball is inside the wrong target, a selection still occurs, but is logged as an error. After the specified number of selections, results appears:
Testing is organized as trials per sequence and sequences per block. At the end of a block, the application terminates.
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 |
TiltTargetActivity.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 |
---|
TiltTargetActivity() |
Modifier and Type | Method and Description |
---|---|
void |
doEndOfSequence() |
void |
doNewSequence() |
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) |
void |
onStop() |
void |
onWindowFocusChanged(boolean hasFocus) |
void |
pickNextTargetKey() |
void |
updateProgressText() |
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, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, 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 void onWindowFocusChanged(boolean hasFocus)
onWindowFocusChanged
in interface android.view.Window.Callback
onWindowFocusChanged
in class android.app.Activity
protected void onResume()
onResume
in class android.app.Activity
protected void onPause()
onPause
in class android.app.Activity
public void onStop()
onStop
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
public int getDefaultDeviceOrientation()
public void doEndOfSequence()
public void doNewSequence()
public void pickNextTargetKey()
public void updateProgressText()
protected float[] lowPass(float[] input, float[] output, float alpha)