title: WearableListenerService onMessageReceived() not called
body: <p>On a phone device I have a WearableListenerService listening for input from a Android Wear device. </p>
  
  <p>I am using both DataItems and Messages. DataItems sync between the two devices just fine, however, I am having problems with receiving messages on the phone.</p>
  
  <p>I have tried the following:</p>
  
  <ul>
  <li>Confirmed Wear has sent the message</li>
  <li>Checked if package names are the same</li>
  <li>Checked if signatures are the same (both are Android Debug)</li>
  </ul>
  
  <p>Still, onMessageReceived is not called in DataLayerListenerService. Originally, I was using an activity and extending MessageListener which did not work either besides one point where it briefly worked.</p>
  
  <h3>Android Wear code</h3>
  
  <pre><code>public static void sendMessageToDevice(final String commandPath, final byte[] additionalData)
  {
      // Separate thread from UI thread
      new Thread(new Runnable()
      {
          @Override
          public void run()
          {
              String nodeId = null;
  
              // Find first connected device id
  
              NodeApi.GetConnectedNodesResult result =
                      Wearable.NodeApi.getConnectedNodes(mGoogleApiClient).await();
              List&lt;Node&gt; nodes = result.getNodes();
  
              if (nodes.size() &gt; 0)
              {
                  nodeId = nodes.get(0).getId();
              }
              if (nodeId != null)
              {
                  Wearable.MessageApi.sendMessage(mGoogleApiClient, nodeId,
                          commandPath, additionalData).setResultCallback(new ResultCallback&lt;MessageApi.SendMessageResult&gt;()
                  {
                      @Override
                      public void onResult(MessageApi.SendMessageResult sendMessageResult)
                      {
                          if (!sendMessageResult.getStatus().isSuccess())
                          {
                              System.err.println("Message " + commandPath + " could not be sent.");
                          }
                      }
                  });
  
                  System.out.println("Command path is: " + commandPath);
              }
          }
      }).start();
  }
  </code></pre>
  
  <h3>Android device code</h3>
  
  <pre><code>public class DataLayerListenerService extends WearableListenerService
  {
  
  @Override
  public void onMessageReceived(MessageEvent messageEvent)
  {
      System.out.println("Received command");
      String command = messageEvent.getPath();
      System.out.println("Received command is: " + command);
      if (command.contains("/mobile/input/"))
      {
          System.out.println(command);
      }
  }
  
  @Override
  public void onDataChanged(DataEventBuffer dataEvents)
  {
      for (DataEvent event : dataEvents)
      {
          if (event.getType() == DataEvent.TYPE_CHANGED)
          {
              DataItem item = event.getDataItem();
              DataMap dataMap = DataMapItem.fromDataItem(item).getDataMap();
              String itemPath = item.getUri().getPath();
              if (itemPath.equals("/mobile/input/level"))
              {
                  int level = dataMap.getInt("level");
                  MainActivity.readLevel(level);
              }
          }
      }
  }
  }
  </code></pre>