Hi all,
New to Android, so this may seem obvious.
Here's what I have: A class called BT_Comm
BT_Comm creates a bluetooth connection and allows me to send data with it via a method called sendData(int xxx, int yyy);
Now, I use this BT_Comm in my main activity -the first one.
Say I have 10 Activities, how could I access that same BT_Comm in other Activities?
Eg:
-------------------------------------------------------
Activity 1 (main)
-------------------------------------------------------
Activity 2
-------------------------------------------------------
Activity 3
-------------------------------------------------------
Does anyone know how I might do this?
Thanks,
Rich.
New to Android, so this may seem obvious.
Here's what I have: A class called BT_Comm
BT_Comm creates a bluetooth connection and allows me to send data with it via a method called sendData(int xxx, int yyy);
Now, I use this BT_Comm in my main activity -the first one.
Say I have 10 Activities, how could I access that same BT_Comm in other Activities?
Eg:
-------------------------------------------------------
Activity 1 (main)
Code:
BT_Comm bt = new BT_Comm();
pubic void someMethod()
{
bt.sendData(xxx, yyy);
}
Activity 2
Code:
private void someOtherMethod()
{
bt.sendData(xxx, yyy);
}
-------------------------------------------------------
Activity 3
Code:
private void someOtherMethod()
{
bt.sendData(xxx, yyy);
}
-------------------------------------------------------
Does anyone know how I might do this?
Thanks,
Rich.