|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.thingmagic.AndroidBluetoothReflection
public class AndroidBluetoothReflection
Provides access to Android Bluetooth classes via Java reflection.
Constructor Summary | |
---|---|
AndroidBluetoothReflection()
|
Method Summary | |
---|---|
static boolean |
checkBluetoothAddress(java.lang.Object bluetoothAdapter,
java.lang.String address)
Invokes the method android.bluetooth.BluetoothAdapter#checkBluetoothAddress . |
static void |
closeBluetoothSocket(java.lang.Object bluetoothSocket)
Invokes the method android.bluetooth.BluetoothSocket#close . |
static void |
connectToBluetoothSocket(java.lang.Object bluetoothSocket)
Invokes the method android.bluetooth.BluetoothSocket#connect . |
static java.lang.Object |
createBluetoothSocket(java.lang.Object bluetoothDevice)
Invokes the method android.bluetooth.BluetoothDevice#createRfcommSocketToServiceRecord . |
static java.lang.Object |
getBluetoothAdapter()
Invokes the method android.bluetooth.BluetoothAdapter#getDefaultAdapter . |
static java.io.InputStream |
getInputStream(java.lang.Object bluetoothSocket)
Invokes the method android.bluetooth.BluetoothSocket#getInputStream . |
static java.io.OutputStream |
getOutputStream(java.lang.Object bluetoothSocket)
Invokes the method android.bluetooth.BluetoothSocket#getOutputStream . |
static java.lang.Object |
getRemoteDevice(java.lang.Object bluetoothAdapter,
java.lang.String address)
Invokes the method android.bluetooth.BluetoothAdapter#getRemoteDevice . |
static boolean |
isBluetoothEnabled(java.lang.Object bluetoothAdapter)
Invokes the method android.bluetooth.BluetoothAdapter#isEnabled . |
static boolean |
isBonded(java.lang.Object bluetoothDevice)
Invokes the method android.bluetooth.BluetoothDevice#getBondState . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AndroidBluetoothReflection()
Method Detail |
---|
public static java.lang.Object getBluetoothAdapter()
android.bluetooth.BluetoothAdapter#getDefaultAdapter
.
android.bluetooth.BluetoothAdapter
object, or null if
Bluetooth is not availablepublic static boolean isBluetoothEnabled(java.lang.Object bluetoothAdapter)
android.bluetooth.BluetoothAdapter#isEnabled
.
bluetoothAdapter
- a android.bluetooth.BluetoothAdapter
object
public static boolean checkBluetoothAddress(java.lang.Object bluetoothAdapter, java.lang.String address)
android.bluetooth.BluetoothAdapter#checkBluetoothAddress
.
bluetoothAdapter
- a android.bluetooth.BluetoothAdapter
objectaddress
- a string that might be a bluetooth MAC address
public static boolean isBonded(java.lang.Object bluetoothDevice)
android.bluetooth.BluetoothDevice#getBondState
.
bluetoothDevice
- a android.bluetooth.BluetoothDevice
object
android.bluetooth.BluetoothDevice
public static java.lang.Object getRemoteDevice(java.lang.Object bluetoothAdapter, java.lang.String address) throws java.lang.IllegalArgumentException
android.bluetooth.BluetoothAdapter#getRemoteDevice
.
bluetoothAdapter
- a android.bluetooth.BluetoothAdapter
objectaddress
- the bluetooth MAC address of the device
android.bluetooth.BluetoothDevice
object
java.lang.IllegalArgumentException
public static java.lang.Object createBluetoothSocket(java.lang.Object bluetoothDevice) throws java.io.IOException
android.bluetooth.BluetoothDevice#createRfcommSocketToServiceRecord
.
bluetoothDevice
- a android.bluetooth.BluetoothDevice
objectuuid
- the service record uuid
android.bluetooth.BluetoothSocket
object
java.io.IOException
public static void connectToBluetoothSocket(java.lang.Object bluetoothSocket) throws java.io.IOException
android.bluetooth.BluetoothSocket#connect
.
bluetoothSocket
- a android.bluetooth.BluetoothSocket
object
java.io.IOException
public static java.io.InputStream getInputStream(java.lang.Object bluetoothSocket) throws java.io.IOException
android.bluetooth.BluetoothSocket#getInputStream
.
bluetoothSocket
- a android.bluetooth.BluetoothSocket
object
InputStream
java.io.IOException
public static java.io.OutputStream getOutputStream(java.lang.Object bluetoothSocket) throws java.io.IOException
android.bluetooth.BluetoothSocket#getOutputStream
.
bluetoothSocket
- a android.bluetooth.BluetoothSocket
object
OutputStream
java.io.IOException
public static void closeBluetoothSocket(java.lang.Object bluetoothSocket) throws java.io.IOException
android.bluetooth.BluetoothSocket#close
.
bluetoothSocket
- a android.bluetooth.BluetoothSocket
object
java.io.IOException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |