Книги автора: Beginning Android
Книга: Beginning Android
Hardware Notifications
Hardware Notifications
You can flash LEDs on the device by setting lights to true, also specifying the color (as an #ARGB
value in ledARGB
) and what pattern the light should blink in (by providing off/on durations in milliseconds for the light via ledOnMS
and ledOffMS
).
You can play a sound, using a Uri
to a piece of content held, perhaps, by a ContentManager(sound)
. Think of this as a ringtone for your application.
You can vibrate the device, controlled via a long[]
indicating the on/off patterns (in milliseconds) for the vibration (vibrate
). You might do this by default, or you might make it an option the user can choose when circumstances require a more subtle notification than an actual ringtone.
Оглавление статьи/книги
Похожие страницы
- TV and Video Hardware
- Choosing Backup Hardware and Media
- Hardware Requirements
- Meeting the Minimum Fedora Hardware Requirements
- Using Legacy Hardware
- Checking Hardware Compatibility
- Preparing for Potential Hardware Problems
- Preparing and Using a Hardware Inventory
- 3.3. Hardware Platforms
- Chapter 4. Configuring the Serial Hardware
- 14.4. Hardware-Assisted Debugging
- 12.2.1. Hardware Debug Probe