code: public static void registerListener(Context context, PlaybackListener listener) {
          IntentFilter filter = new IntentFilter();
          filter.addAction(PlaybackListener.ACTION_ON_TRACK_PLAYED);
          filter.addAction(PlaybackListener.ACTION_ON_PLAYER_PAUSED);
          filter.addAction(PlaybackListener.ACTION_ON_SEEK_COMPLETE);
          filter.addAction(PlaybackListener.ACTION_ON_PLAYER_DESTROYED);
          filter.addAction(PlaybackListener.ACTION_ON_BUFFERING_STARTED);
          filter.addAction(PlaybackListener.ACTION_ON_BUFFERING_ENDED);
          filter.addAction(PlaybackListener.ACTION_ON_PROGRESS_CHANGED);
  
          LocalBroadcastManager.getInstance(context.getApplicationContext())
                  .registerReceiver(listener, filter);
      }
docs: Register a listener to catch player event.
  
  @param context  context used to register the listener.
  @param listener listener to register.