0

i have a problem in android Bluetooth i am creating a application for controlling the power supplies by digitally. according to my application i created 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.

1 Answers1

0

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 .

Community
  • 1
  • 1
confucius
  • 13,127
  • 10
  • 47
  • 66