8

I know the rules of StackOverflow and hence apologize beforehand for asking such a subjective question.

I tried the documentation but all it says is this :

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 registerMediaButtonEventReceiver(ComponentName) before the RemoteControlClient can be registered through registerRemoteControlClient(RemoteControlClient).

I don't know about others but for me, this much of documentation was not enough for something which has such a cool name as "RemoteControlClient".

I searched a lot of forums for this but unfortunately, the concept is still not clear to me.

Would indeed be grateful if someone helped me understand it, how it works and most importantly, what all it is capable of.

Thanks in advance and apologies for asking a subjective question.

Swayam
  • 16,294
  • 14
  • 64
  • 102

1 Answers1

15

http://developer.android.com/about/versions/android-4.0.html

The new RemoteControlClient allows media players to enable playback controls from remote control clients such as the device lock screen. Media players can also expose information about the media currently playing for display on the remote control, such as track information and album art.

and a few more paragraphs on the subject.

It also points out:

For a sample implementation, see the Random Music Player, which provides compatibility logic such that it enables the remote control client on Android 4.0 devices while continuing to support devices back to Android 2.1.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Thank you very much sir! The link you gave was much better! I understand it now better and hope to learn more as I continue working on it! Thanks again! – Swayam Aug 31 '12 at 15:58
  • Is it possible to use RemoteControlClient in the notification area or is it just for the lock screen? – Héctor Júdez Sapena Apr 15 '15 at 09:29
  • @HéctorJúdezSapena: `RemoteControlClient` is not a widget or an app widget -- it is an interface to a part of the lockscreen that (used to) offer media control. I am not aware of a way for you to use a `RemoteControlClient` in conjunction with a `Notification`. However, on Android 5.0+, there is a `MediaStyle` big `Notification` that you can use, which supplants `RemoteControlClient`, which was then deprecated. – CommonsWare Apr 15 '15 at 11:32