Skip to content

Commit

Permalink
Disconnect:
Browse files Browse the repository at this point in the history
  • Loading branch information
novandikp committed Nov 3, 2022
1 parent 575fe9a commit 2e08783
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 0 additions & 1 deletion .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ public boolean isPermissionScanGranted() {
return android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.S || ContextCompat.checkSelfPermission(context, Manifest.permission.BLUETOOTH_SCAN) == PackageManager.PERMISSION_GRANTED;
}

public void disconnect(){
if(deviceConnected!=null){
deviceConnected.disconnect();
deviceConnected=null;
}
}

private void getDeviceConnected() {
if(deviceConnected==null) {
deviceConnected = BluetoothPrintersConnections.selectFirstPaired(device_bt_simplethermalprinter);
Expand Down

0 comments on commit 2e08783

Please sign in to comment.