How to know if a message sended from Android wear is received from Android handheld? -



How to know if a message sended from Android wear is received from Android handheld? -

here code, don't understand why success status message in not received handheld because handheld app off... how can know if message sended , recived on handheld?

for (node node : nodes.getnodes()) { messageapi.sendmessageresult result = wearable.messageapi .sendmessage(mgoogleappiclient, node.getid(), start_activity_path, canalebyte) .await(); if (!result.getstatus().issuccess()) { homecoming false; } else { homecoming true; } }

your app doesn't need "on" receive message, installed. if want see if message received, add together wearablelistener on handheld , add together specific behaviour overriding onmessagereceived() method.

more infos here : https://developer.android.com/training/wearables/data-layer/messages.html , here : https://developer.android.com/reference/com/google/android/gms/wearable/messageapi.html

android android-wear android-wear-data-api

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -