Back to project page LeBlue.
The source code is released under:
Apache License
If you think the Android project LeBlue listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package houtbecke.rs.le.mock; //from w ww . j a v a2s . c o m import java.util.UUID; import houtbecke.rs.le.LeDevice; import houtbecke.rs.le.LeDeviceListener; public class LeDeviceMock implements LeDevice { public LeDeviceMock(int key, LeMockController leMockController) { this.controller = leMockController; leMockController.addDevice(key, this); } LeMockController controller; @Override public void addListener(LeDeviceListener listener) { controller.deviceAddListener(this, listener); } @Override public void removeListener(LeDeviceListener listener) { controller.deviceRemoveListener(this, listener); } @Override public boolean checkBleHardwareAvailable() { return controller.deviceCheckBleHardwareAvailable(this); } @Override public boolean isBtEnabled() { return controller.deviceIsBtEnabled(this); } @Override public void startScanning() { controller.deviceStartScanning(this); } @Override public void startScanning(UUID... uuids) { controller.deviceStartScanning(this, uuids); } @Override public void stopScanning() { controller.deviceStopScanning(this); } // public void findLeDevice(LeRemoteDevice remoteDevice, int rssi, byte[] scanRecord) { // for (LeDeviceListener listener: listeners) // listener.leDeviceFound(this, remoteDevice, rssi, scanRecord); // } }