Wearablelistenerservice's Ondatachanged Not Called On Phone
I have an app on the wearable that should send a datamap to the handheld on a button click. I've made almost the same setup from the handheld to the phone, only difference is that
Solution 1:
I would start by removing the android:pathPrefix
since it's filtering the data your service is listening for. You should see the onDataChange()
being called now.
After you see the data come across, you can go back and set the pathPrefix to whatever you are setting the path to in your Wearable. (I am guessing /data-item-received). The pathPrefix matches the beginning of whatever you specify after the host.
Here is what you want if that is the case:
<serviceandroid:name=".ListenerServiceMobile"><intent-filter><actionandroid:name="com.google.android.gms.wearable.DATA_CHANGED" /><dataandroid:scheme="wear"android:host="*"android:pathPrefix="/data-item-received"" /></intent-filter></service>
Post a Comment for "Wearablelistenerservice's Ondatachanged Not Called On Phone"