When a viewer presses the audio or subtitle button on remote control, can I be notified of this? Which listener do I need to implement to do this?
You can be notified of key presses by implementing the UserEventListener interface and creating a new UserEventRepository to which you add the keys that you want to receive events of. Then after registering your class and UserEventRepository in the EventManager, you should receive key events.
I think the following piece of code might be usefull:
public class MyXlet implements Xlet, UserEventListener
public void registerToKeyEvents()
UserEventRepository uer = new UserEventRepository("KeyListener");
// Add any other keys you want to listen to here, such as HRcEvent.VK_SUBTITLE
public void unregisterFromKeyEvents()
// Call this fro destroyXlet orso..
// To implement UserEventListener
public void userEventReceived(UserEvent ue)
if (ue.getType() == HRcEvent.KEY_PRESSED)
// Function that's gonna handle key presses
This should work for the subtitle button (not tested myself), but I haven't found any virtual key for the audio button (so not sure if your BD-J Xlet can be notified of an audio button keypress.
Message was edited by: markkurvers
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.