我曾经使用com.google.android.gms.wearable.BIND_LISTENER
和WearableListenerService
在我的Mobile和Wear设备之间进行通信。Android Wear:解决“com.google.android.gms.wearable.BIND_LISTENER”
意图com.google.android.gms.wearable.BIND_LISTENER
后得到废弃的,我应该使用:
<service android:name=".MyListenerService">
<intent-filter>
<action android:name="com.google.android.gms.wearable.DATA_CHANGED" />
<action android:name="com.google.android.gms.wearable.MESSAGE_RECEIVED" />
<data android:scheme="wear" android:host="*" android:pathPrefix="/prefix" />
</intent-filter>
</service>
但我怎么跟我WearableListenerService
结合起来呢?广播将在哪里收到?
我正在使用DATA_CHANGED和MESSAGE_RECEIVED。但是,我没有收到我的Wearable ListernerService中的任何内容 –