Back to project page Android.Wear.Message.
The source code is released under:
MIT License
If you think the Android project Android.Wear.Message listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.iamnbty.androidwear.service; /* w ww . jav a2 s . c o m*/ import android.widget.Toast; import com.google.android.gms.wearable.MessageEvent; import com.google.android.gms.wearable.WearableListenerService; public class ListenerService extends WearableListenerService { @Override public void onMessageReceived(MessageEvent messageEvent) { super.onMessageReceived(messageEvent); String nodeId = messageEvent.getSourceNodeId(); Toast.makeText(this, "Received message from: " + nodeId + ", " + messageEvent.getPath(), Toast.LENGTH_SHORT).show(); } }