title: Receiving data messages from com.google.cast.media namespace on Android sender app
body: <p>I created a custom receiver for Chromecast that plays video and I am trying to send messages back to my Android sender app on the same namespace. I'm currently doing it this way in Javascript:</p>
  
  <pre><code>window.castReceiverManager = cast.receiver.CastReceiverManager.getInstance();
  window.castReceiverManager.start();
  
  //use namespace urn:x-cast:com.google.cast.media to communicate to VideoCastManager in Android...?
  window.customMessageBus = castReceiverManager.getCastMessageBus('urn:x-cast:com.google.cast.media', cast.receiver.CastMessageBus.MessageType.JSON);
  
  //overwrite the onMessage function
  var defaultFunction = window.customMessageBus.onMessage;
  window.customMessageBus.onMessage = function(event) {
    window.senderId = event.senderId;
    window.message = event.data;
    defaultFunction(event);
  };
  
  //send message
  window.customMessageBus.send(window.senderId, {message: "test"});
  </code></pre>
  
  <p>In Android, I am trying to receive the messages in this way:</p>
  
  <pre><code>mCastConsumer = new VideoCastConsumerImpl() {
          //removed all the other override functions to save space
  
          @Override
          public void onDataMessageReceived(String message) {
              System.out.println("CAST RECEIVED MESSAGE:" + message);
          }
  
      };
  </code></pre>
  
  <p>This doesn't work, and I was hoping someone could point me in the right direction?</p>
  
  <p>Thanks</p>