Thursday, August 25, 2016

Detecting connect/disconnect using CapabilityApi

In developing my wear watch faces I like to have the wearable vibrate when it detects connection of disconnection from the mobile. In the past I've implemented NodeApi.NodeListener and done the vibration in the onPeerConnect or onPeerDisconnect methods.
This has worked well but NodeApi has be deprecated in favor of the CapabilityApi.
Does anyone know of any simple example of how to detect connection using the CapabilityApi? None of the examples I've tried have worked at all. It should be fairly simple since I'm not trying to do downloads or anything, just detecting.

Thanks.


from xda-developers http://ift.tt/2bmfyrI
via IFTTT

No comments:

Post a Comment