Introducing the Remote Control ClientAndroid 4.0 (API level 14) introduced the Remote Control Client. Using the Remote Control Client, your application can provide data, and respond, to remote controls capable of displaying metadata, artwork, and media transport control buttons — such as the lock screen on Android 4.0 devices, as shown in Figure 15-2. To add support for the Remote Control Client in your application, you must have a Receiver implementation that has been registered as a Media Button Event Receiver, as described earlier in the “Responding to the Media Playback Controls” section.Create a Pending Intent containing the action_media_button action that is targeted at your Receiver, and use it to create a new Remote Control Client. You register it with the Audio Manager using the registerRemoteControlClient method, as shown in Listing 15-15.
đang được dịch, vui lòng đợi..
