IT. Expert System.

Android Reference

RemoteControlClient


android.media

Class RemoteControlClient



  • public class RemoteControlClient
    extends Object
    RemoteControlClient enables exposing information meant to be consumed by remote controls capable of displaying metadata, artwork and media transport control buttons.

    A remote control client object is associated with a media button event receiver. This event receiver must have been previously registered with AudioManager.registerMediaButtonEventReceiver(ComponentName) before the RemoteControlClient can be registered through AudioManager.registerRemoteControlClient(RemoteControlClient).

    Here is an example of creating a RemoteControlClient instance after registering a media button event receiver:

    ComponentName myEventReceiver = new ComponentName(getPackageName(), MyRemoteControlEventReceiver.class.getName());
     AudioManager myAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
     myAudioManager.registerMediaButtonEventReceiver(myEventReceiver);
     // build the PendingIntent for the remote control client
     Intent mediaButtonIntent = new Intent(Intent.ACTION_MEDIA_BUTTON);
     mediaButtonIntent.setComponent(myEventReceiver);
     PendingIntent mediaPendingIntent = PendingIntent.getBroadcast(getApplicationContext(), 0, mediaButtonIntent, 0);
     // create and register the remote control client
     RemoteControlClient myRemoteControlClient = new RemoteControlClient(mediaPendingIntent);
     myAudioManager.registerRemoteControlClient(myRemoteControlClient);


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 844 / . Delta: 0.04934 с