位置: 编程技术 - 正文

Android as Bluetooth Low Energy Peripherial (GATT server).

编辑:rootadmin
I demonstrate how to write a simple BLE peripheral application in Android here. I am bad in Android development, The UI would be very ugly, but the code work: Currently(5//), the code could be running in Nexus 6 or Nexus 9 only based on my test. The other phones or tablets not support to be a BLE peripheral. So, if you really interested in the Android as peripheral issue, please open your wallet and buy a GOOGLE official device, thank you. How to add a characteristic as notification is little bit complicated, In here I just add read write ones. About the notification, I put code in the lat part of this post.You should add The 2 lines in your AndroidManifest.xml, like this :The kernal code are below , note the AdvertiseCallback is callback of BluetoothLeAdvertiser ::startAdvertising, and BluetoothGattServerCallback is callback function of ALL BluetoothGattCharacteristic.BLEPeripheral.java: (that is what you want) MainActivity.java : (UI part)activity_main.xml: (layout, very ugly) I do not like to write too much explanation in here, One said: if you could implement, you understand it; if you could not, you know about nothing of it .About notification characteristic:Replace the line :As : That is, create a thread , that updates value and send a signal to BluetoothGattServer to note the value has been change.

推荐整理分享Android as Bluetooth Low Energy Peripherial (GATT server).,希望有所帮助,仅作参考,欢迎阅读内容。

Android as Bluetooth Low Energy Peripherial (GATT server).

文章相关热门搜索词:,内容如对您有帮助,希望把文章链接给更多的朋友!

intent.setFlags方法中的参数值含义 一.intent.setFlags()方法中的参数含义:1.FLAG_ACTIVITY_CLEAR_TOP:例如现在的栈情况为:ABCD。D此时通过intent跳转到B,如果这个intent添加FLAG_ACTIVITY_CLEAR_TOP标记

手把手教你打造一个Material Design风格的App(二) ——接上文。3.1添加ToolBar(ActionBar)添加ToolBar非常简单,你需要做的仅仅是为toolbar创建一个单独的layout布局,如果你想在哪里展示toolbar,只要在对应布

前方高能--Retrofit RetrofitAtype-safeRESTclientforAndroidandJavaAndroid中非常有名的网络框架官网:

标签: Android as Bluetooth Low Energy Peripherial (GATT server).

本文链接地址:https://www.jiuchutong.com/biancheng/385202.html 转载请保留说明!

上一篇:Android 下抓包(安卓抓包apk)

下一篇:intent.setFlags方法中的参数值含义(intent.setdata)

  • 增值税专用发票电子版
  • 公司章程在工商局
  • 未到账的银行存款怎么取
  • 资本公积不足冲减是什么意思
  • 六税两费减半征收政策
  • 进项税额记哪方
  • 豆粕是农产品初加工,企业所得税免税
  • 出版产品
  • 机械租赁费怎么算
  • 开发成本存货减少
  • 企业买电动车做资产如何做折旧?
  • 其他应付款重分类到哪个科目
  • 短期借款占负债比例大
  • 小规模纳税人工程服务的增值税率
  • 酒店工作车工作间标准
  • 单位杂工费报销计什么科目
  • 固定资产一次性扣除账务处理
  • 个税按计提申报还是按发放申报
  • 增值税发票选择确认平台证书密码是多少
  • 资金筹集业务核算实训心得体会
  • 公司内部银行往来款会计分录
  • 融资租赁固定资产折旧
  • 怎么查以前申报的财务报表
  • 有限的访问权限是什么意思
  • 收到供应商发票分录应怎么写?
  • 空调应该计入什么科目
  • 报税时漏报进项怎么办
  • 支付代销手续费缴纳增值税吗
  • 应付债券的会计处理例题
  • 存货跌价准备减少
  • 营业外收支的内容
  • 非流动资产增加说明什么原因
  • php的中文名
  • node安装配置环境变量
  • vue中的$el
  • ipcrm命令
  • dir命令linux
  • day03-CSS
  • 视同销售的情况有哪些?
  • 公司买东西了怎么做账
  • 一次性收取一年租金增值税怎么计算
  • 零申报企业所得税季度申报表怎么填写
  • 股东撤资怎么做账
  • phpcms添加内容
  • 注册资金印花税税率是多少,怎么计算?
  • 报废车怎么处理最划算
  • 申请名称预先核准在哪个网站
  • 实际出资和名义出资
  • 营业外支出在贷方
  • 电子商业承兑会不会拿不到钱
  • 专款支出和事业支出
  • 管理费用抵消分录
  • 员工在异地缴纳社保,公司还能上吗
  • 银行代扣水电
  • 建筑行业跨期收益怎么算
  • 工会经费支出范围
  • 银行受理汇票贴现业务
  • 安装设备是干嘛的
  • 企业明细是什么
  • MySQL中truncate误操作后的数据恢复案例
  • mysql5.6怎么用
  • 自动化生产线模型
  • win7开机taskeng
  • win8打开桌面
  • Mac OS X Mavericks的Finder打开不同标签的操作步骤
  • WFXSVC.EXE - WFXSVC是什么进程
  • linux系统中怎么输入中文
  • win7无法正常关机
  • win10登陆界面怎么关闭
  • centos做服务器
  • 简述dom的组成
  • android开发步骤
  • 批处理 全局变量
  • cocos2dx开发的游戏有哪些
  • shell脚本mysql
  • html5webview交互
  • js跨域的几种方法
  • 山西地方税务局领导班子
  • 淄博市税务局投诉电话
  • 非居民企业通俗指
  • 免责声明:网站部分图片文字素材来源于网络,如有侵权,请及时告知,我们会第一时间删除,谢谢! 邮箱:opceo@qq.com

    鄂ICP备2023003026号

    网站地图: 企业信息 工商信息 财税知识 网络常识 编程技术

    友情链接: 武汉网站建设