Android BluetoothSocket Transfer to Next Activity

After connecting to Bluetooth, I need a child to send data through this socket. But how do I get a socket for childActivity?

+5
source share
1 answer

Not sure if this is the best design, but what I did here and it worked on my simple application was that the Bluetooth connection (socket) was a “global variable”, a variable of my main application (a class that extends the class Application) .

Thus, all my actions can get and install it.

, / , Android

0

All Articles