Epson Moverio Pro BT-2000 Developer's Manual page 175

Hide thumbs Also See for Moverio Pro BT-2000:
Table of Contents

Advertisement

8.9.3. Registering scan start and callback
To start the Beacon function, register the callback function using setGapCallback() to receive
Advertise from the Beacon device, and start scanning using startScan().
import android.widget.Toast;
public class MainActivity extends Activity {
private BluetoothLeAdapterManager mManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
//Instance acquisition for the BLE manager class
mManager = BluetoothLeAdapterManager.getInstance();
//Register a callback for the GAP function provided
mManager.setGapCallback(mLeGapCallback);
}
private void scanLe(final boolean enable) {
if ( enable ) {
} else {
}
}
Receive scan results using the following callback, and output the received signal strength to a
log.
private BluetoothLeGapCallback mLeGapCallback = new BluetoothLeGapCallback(){
@Override
public void onScanResult(AddrType addrType, String addr, int rssi
}
};
}
MOVERIO Pro Developer's Guide (Rev.1.4)
//Start scanning
mManager.starScan();
//Stop scanning
mManager.stopScan();
, byte[] adv_data) {
Log.i("DEBUG", "rssi=" + rssi);
169

Advertisement

Table of Contents
loading

This manual is also suitable for:

Moverio pro bt-2200

Table of Contents