打印

invoke a method when app is closed

[复制链接]
248|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
kaloulin|  楼主 | 2018-9-8 20:32 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
I\'m developing bluetooth low energy application, using bluetoothgatt, I would like to have a connection going as long as application is running.
which function can I relay on to be called on application being closed? (I understand onTerminate isn\'t assured to be called)
I want to invoke the bluetoothGatt.close() function.
Currently I\'m not using it and I see that the other side keeps on sending data to the android for about 30 seconds.. leading the next app connection to have invalid old data.. (I\'m thinking it is because I\'m currently not calling close..)
any help would be greatly appreciated, also maybe there is a place for me to see source code of working apps? (I\'m new to android programming)

使用特权

评论回复

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

439

主题

448

帖子

0

粉丝