public class H4TouchActivity extends android.app.Activity implements H4Keyboard.H4Listener
The following publication describes the design of H4Writer, the text entry method upon which H4Touch is based.
In all, there are 13 setup parameters, organized in eight spinners and five 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/
.
Key style Sets the arrangement of the 4 keys. The options are "+" or "x", corresponding, in order, to
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. Show presented text during input A checkbox item. If selected, shows the presented text during entry. If un-selected, the presented text phrase disappears as soon as input begins for the current text phrase. Lowercase only A checkbox item. If selected, converts to lowercase any uppercase letters in the presented text phrase. Show Huffman codes A checkbox item. If selected, letters are shown on keys as entry progresses. At the beginning of each character of input, the letters appear as follows (as per the Key Style parameter): (click to enlarge)
The letters are updated on each key press to show the progression through the Huffman code tree. If un-selected, letters do not appear on keys as entry progresses. In this case, the keys appear as seen above for the Key Style parameter.
A phrase of text is drawn at random from the phrases file and presented for input. To enter text, the user taps keys according the desired letter. For the first letter in the phrase above ("h"), the user first taps the top-left key. The key labels are updated to show the progression through the Huffman tree (above center). The desired letter now appears on the bottom-left key. The user taps the key whereupon the letter appears in the transcribed text field (above right). For this example, entering the letter "h" required two taps. Depending on the letter, sometimes more taps are required. On average, 2.321 taps are required for each letter entered.
At the end of a phrase, results appear:
The data in the sd2 files 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.
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 |
---|
H4TouchActivity() |
Modifier and Type | Method and Description |
---|---|
void |
H4TapEvent(H4Keyboard.H4Event h4e)
Called for each keystroke.
|
void |
onConfigurationChanged(android.content.res.Configuration newConfig) |
void |
onCreate(android.os.Bundle savedInstanceState) |
void |
onRestoreInstanceState(android.os.Bundle savedInstanceState) |
void |
onSaveInstanceState(android.os.Bundle savedInstanceState) |
static float |
wpm(java.lang.String text,
long msTime)
Compute text entry speed in words per minute (wpm).
|
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, 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, onPause, onPictureInPictureModeChanged, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRequestPermissionsResult, onRestart, onRestoreInstanceState, onResume, onRetainNonConfigurationInstance, 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 void H4TapEvent(H4Keyboard.H4Event h4e)
H4Keyboard.H4Listener
H4TapEvent
in interface H4Keyboard.H4Listener
public static float wpm(java.lang.String text, long msTime)
text
- a phrase of textmsTime
- time to enter the phrase in millisecondspublic void onConfigurationChanged(android.content.res.Configuration newConfig)
onConfigurationChanged
in interface android.content.ComponentCallbacks
onConfigurationChanged
in class android.app.Activity
public void onSaveInstanceState(android.os.Bundle savedInstanceState)
onSaveInstanceState
in class android.app.Activity
public void onRestoreInstanceState(android.os.Bundle savedInstanceState)
onRestoreInstanceState
in class android.app.Activity