开发者

android bluetooth problems

开发者 https://www.devze.com 2023-04-03 04:03 出处:网络
i have a problem in android Bluetooth i am creating a application for controlling the power supplies by digitally. according to my application i crea开发者_如何学运维ted 3 tabs in this 3 tabs i write

i have a problem in android Bluetooth i am creating a application for controlling the power supplies by digitally. according to my application i crea开发者_如何学运维ted 3 tabs in this 3 tabs i write three activity's but in last tab i am crating a Bluetooth connection, But my problem is how can i write the data to the Bluetooth from the first and second tabs ??

i used Bluetooth chat application.the socket is crated and connections established successfully. data also transmitted in third tab. but i don't know how to access already established connection to other activity.


look at this question and try to put your socket in the Application class as a instance variable and u can access it from any part of your application ... make sure that you make a check if it's prepared or not .

0

精彩评论

暂无评论...
验证码 换一张
取 消