Beispiel #1
0
 @Override
 public void onPlaybackEvent(EventType eventType, PlayerState playerState) {
   Log.d("MainActivity", "Playback event received: " + eventType.name());
   switch (eventType) {
       // Handle event type as necessary
     default:
       break;
   }
 }
Beispiel #2
0
 @Override
 public void onPlaybackEvent(final EventType eventType, final PlayerState playerState) {
   // Remember kids, always use the English locale when changing case for non-UI strings!
   // Otherwise you'll end up with mysterious errors when running in the Turkish locale.
   // See: http://java.sys-con.com/node/46241
   String eventName = eventType.name().toLowerCase(Locale.ENGLISH).replaceAll("_", " ");
   logStatus("Player event: " + eventName);
   mCurrentPlayerState = playerState;
   updateButtons();
 }
 /**
  * Creates a new {@code DataEvent} instance.
  *
  * @param session the {@link Session} that published the event
  * @param type the {@code EventType} of the {@code DataEvent}
  * @param payload the payload containing the entities the {@code DataEvent} corresponds to
  */
 public DataEvent(Session session, EventType type, Map<String, Object> payload) {
   super(type.name(), session, payload);
   mType = type;
 }