beautypg.com

Section 2. code examples, Open device, Close device – MagTek Audio Reader for Android Devices User Manual

Page 29

background image

23

SECTION 2. CODE EXAMPLES

Open Device:

if

(!

mMTSCRA

.isDeviceConnected()) {

mMTSCRA

.setDeviceType(

mMTSCRA

.

DEVICE_TYPE_BLUETOOTH

);

mMTSCRA

.setDeviceID(

"00:06:66:44:C8:2C"

);

mMTSCRA

.openDevice();

}



Close Device:

if

(

mMTSCRA

!=

null

)

mMTSCRA

.closeDevice();