https://github.com/ttlock/Android_SDK_Demo/blob/master/README.en.md
新版SDK Android端Demo
1.锁操作相关: TTLockClient
2.锁固件升级相关:LockDfuClient
3.网关操作相关:GatewayClient
Android Studio
18
implementation 'com.ttlock:ttlock:3.2.6'
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
TTLockClient.getDefault().prepareBTService(getApplicationContext());
TTLockClient.getDefault().startScanLock(new ScanLockCallback() {
@Override
public void onScanLockSuccess(ExtendedBluetoothDevice device) {
}
});
TTLockClient.getDefault().stopBTService();