博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Binder
阅读量:5904 次
发布时间:2019-06-19

本文共 2772 字,大约阅读时间需要 9 分钟。

import android.bluetooth.BluetoothGatt;import android.bluetooth.BluetoothGattCallback;public interface BleManagerCallbacks {	/**	 * Called when the device has been connected. This does not mean that the application may start communication. A service discovery will be handled automatically after this call. Service discovery	 * may ends up with calling {@link #onServicesDiscovered(boolean)} or {@link #onDeviceNotSupported()} if required services have not been found.	 */	public void onDeviceConnected();	/**	 * Called when user pressed the DISCONNECT button.	 */	public void onDeviceDisconnecting();	/**	 * Called when the device has disconnected (when the callback returned {@link BluetoothGattCallback#onConnectionStateChange(BluetoothGatt, int, int)} with state DISCONNECTED.	 */	public void onDeviceDisconnected();	/**	 * Some profiles may use this method to notify user that the link was lost. You must call this method in your Ble Manager instead of {@link #onDeviceDisconnected()} while you discover	 * disconnection not initiated by the user.	 */	public void onLinklossOccur();	/**	 * Called when service discovery has finished and primary services has been found. The device is ready to operate. This method is not called if the primary, mandatory services were not found	 * during service discovery. For example in the Blood Pressure Monitor, a Blood Pressure service is a primary service and Intermediate Cuff Pressure service is a optional secondary service.	 * Existence of battery service is not notified by this call.	 * 	 * @param optionalServicesFound	 *            if true the secondary services were also found on the device.	 */	public void onServicesDiscovered(final boolean optionalServicesFound);	/**	 * Method called when all initialization requests has been completed.	 */	public void onDeviceReady();	/**	 * Called when battery value has been received from the device	 * 	 * @param value	 *            the battery value in percent	 */	public void onBatteryValueReceived(final int value);	/**	 * Called when an {@link BluetoothGatt#GATT_INSUFFICIENT_AUTHENTICATION} error occurred and the device bond state is NOT_BONDED	 */	public void onBondingRequired();	/**	 * Called when the device has been successfully bonded	 */	public void onBonded();	/**	 * Called when a BLE error has occurred	 * 	 * @param message	 *            the error message	 * @param errorCode	 *            the error code	 */	public void onError(final String message, final int errorCode);	/**	 * Called when service discovery has finished but the main services were not found on the device. This may occur when connecting to bonded device that does not support required services.	 */	public void onDeviceNotSupported();}

 

转载于:https://www.cnblogs.com/iamgoodman/p/4730178.html

你可能感兴趣的文章
mysql安装,远程连接,以及修改密码
查看>>
Mybatis查询返回Map类型数据
查看>>
java的深拷贝与浅拷贝
查看>>
程序员如何提高工作效率
查看>>
promise
查看>>
将Java应用部署到SAP云平台neo环境的两种方式
查看>>
数据批量导入Oracle数据库
查看>>
调用lumisoft组件发邮件 不需要身份验证 不需要密码
查看>>
DW 正则
查看>>
抓屏原理
查看>>
UNIX网络编程读书笔记:TCP输出、UDP输出和SCTP输出
查看>>
扩展 DbUtility (1)
查看>>
iOS开发UI篇—使用picker View控件完成一个简单的选餐应用
查看>>
Hadoop学习笔记系列文章导航
查看>>
SpringMVC中ModelAndView addObject()设置的值jsp取不到的问题
查看>>
Prometheus : 入门
查看>>
使用 PowerShell 创建和修改 ExpressRoute 线路
查看>>
在C#中获取如PHP函数time()一样的时间戳
查看>>
Redis List数据类型
查看>>
大数据项目实践(四)——之Hive配置
查看>>