MyGatt
BLE开发所需要的知识,通过官方demo,我们会发现很多service,点击service后,每个service下面是Characteristic,每个service和Characteristic都对应一个唯一的UUID。所以,在做BLE时候,首先你应该找出你的蓝牙外围设备uuid,不然会很头疼,这个UUID也可能是硬件给你的,也可以你自己试出来,当然自己试出来是个很烦的过程。自己试的方法就是根据demo,加上一份读写的协议,然后,排着点击,显示出来的蓝牙列表进行测试,看是否和协议对应。另外,BluetoothLeService类不用做太多的更改。(BLE develops the knowledge we need. Through official demo, we will find many service. After clicking service, every service is Characteristic, each service and Characteristic correspond to a unique UUID. So, when making BLE, first you should find out your Bluetooth peripheral device UUID, otherwise it will be very headache. This UUID may also be hardware for you, or you can try it out yourself, of course, trying out it yourself is a very boring process. The way to do it is to add a read and write protocol based on demo,then test the Bluetooth list displayed by clicking on it to see if it corresponds to the protocol. In addition, the BluetoothLeService class does not have to make too many changes.)
- 2018-02-07 11:55:52下载
- 积分:1
Android具有多选功能的滚动抽签范例
Android具有多选功能的滚动抽签范例,抽奖的候选名单可以从列表中选择,支持多选,然后进行抽签。抽签的候选名单本例中使用了数组,定义在String[] areas中,形如String[] areas = new String[]{"蔡瑞", "徐永浩", "范金端", "王源", "李英明", "刘宇阳","聂明炎","张启震","杨志爽","马玉炎","邢全伟","詹旭琛","刘津旭","陈琳","陈凯","谢冲","王辰","舒震","刘坚强","沈依铭","欧阳知雨","王晨","路少雯","王蕾","郭毛","宋蜜","刘琛","任梦萤","徐瑶","叶乔羽","董乐","孟燦"};,然后定义了多选列表中的数据、抽签等多个子函数来完成功能,代码还是比较简单的。
- 2023-04-23 09:30:02下载
- 积分:1