Top 7 Android Accessibility Features
One often overlooked aspect of mobile application design is accessibility. That is, designing the application such that it functions well for all users, including those with special needs or disabilities. Increasingly, accessibility features are needed for specific user situations as well; for example, automobile drivers are now limited in their device usage by traffic safety laws.
As mobile platforms have matured, accessibility features have begun to appear as part of the developer SDKs, but they are easily overlooked or forgotten about by novice developers who simply rapid prototype their application and throw it up onto the Android Market. These developers are missing an exciting opportunity to differentiate their applications from others by integrating simple but robust accessibility features at design time. Doing so helps both the users (who may need these features to use the app) and the developer (who wants as many users downloading and using the app as possible).
The Android SDK includes many features to support accessibility. In addition to the primary accessibility packages, there are subtle accessibility features peppered throughout the commonly used classes of the SDK. Let's look at some of the top features of the Android SDK designing and building highly accessible applications. These methods are discussed in order of difficulty from easy to more challenging.
#1: Use View Content Descriptions
One of the easiest ways to improve the accessibility of your application is to provide content descriptions to each of the View controls in your user interfaces. This information can be used by accessibility services and tools like screen readers to help visually-impaired users navigate your application user interfaces. In XML, the attribute is called android:contentDescription. The related View class method is setContentDescription. For example, if you had an ImageView control with a picture of a gorilla, you might set a content description string saying as much. Similarly, you can use content descriptions to differentiate between Button controls when more than one is displayed on the screen by providing a short description naming that Button control's purpose.
#2: Leverage Haptic Feedback Features
As the Android SDK documentation so eloquently puts it: "BZZZTT!!1!" Haptic feedback is that little physical vibration you feel when you press controls on the touchscreen of the device. View controls have certain built-in haptic feedback features. However, you can override the default behavior easily to provide your own haptic feedback features for other events. Haptic features for a given control can be enabled or disabled, and events can be generated by the developer. See the View control attributes and methods associated with haptic feedback for details .
#3: Leverage Text-to-Speech Services
Text-to-speech (TTS) services take textual data and have the device "read" the content aloud using a computer "voice." Hands-free applications, such as navigation apps routinely use this technology to provide turn-by-turn directions to automobile drivers, while the visually impaired can also use this type of service to help decipher text on the screen. The TTS features available with the Android SDK are found in the android.speech.tts package and are very easy to incorporate into your applications with the TextToSpeech class (android.speech.tss.TextToSpeech).
#4: Leverage Speech Recognition Services
Simply text-to-speech in reverse, speech recognition services take voice input from the user and turn it into textual data. You'll frequently see this service used by search applications and contact management applications that respond to specific commands like "Call Mom." The speech recognition features available with the Android SDK are found in the android.speech package and are very easy to incorporate into your applications with the android.speech.RecognizerIntent intent. This intent can be used to launch the built-in speech recorder and retrieve the resulting text to your application.
We discuss TTS and speech recognition services in detail, with fully functional code, in our Developer.com article entitled "Add Text-To-Speech and Speech Recognition to Your Android Applications."
Page 1 of 2