0
点赞
收藏
分享

微信扫一扫

杰理之手表实现健康管理类【篇】

生活记录馆 2022-02-10 阅读 50
python

publicclassWatchManagerextendsWatchOpImpl{privateBluetoothDevicemTargetDevice;publicstaticWatchManagergetInstance(){if(nullinstance){synchronized(WatchManager.class){if(nullinstance){instance=newWatchManager(FUNC_WATCH);}}}returninstance;}//funcFUNC_WATCH:全功能FUNC_RCSP:仅仅使用rcsp协议FUNC_FILE_BROWSE:使用rcsp协议和目录浏览功能publicWatchManager(intfunc){super(func);}/获取当前连接的设备,sdk的操作都是基于该设备@return目标设备/@OverridepublicBluetoothDevicegetConnectedDevice(){returnmTargetDevice;}/SDK通知外部需要发送数据@paramdevice蓝牙设备对象@paramdata数据包byte数组@returnfalse:发送失败true:发送成功/@OverridepublicbooleansendDataToDevice(BluetoothDevicedevice,byte[]data){returnfalse;}

举报

相关推荐

0 条评论