Skip to content

Commit

Permalink
Add a bit nicer error message if bluetooth device uuids are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
robbi5 committed Sep 9, 2024
1 parent bfebeb6 commit ca8c98f
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class BluetoothConnection : ConnectionType {
// Hardcoded UUID for virtual bluetooth interface of built-in printer in iMin Falcon 1
device.createInsecureRfcommSocketToServiceRecord(UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"))
} else {
if (device.uuids == null) {
throw PrintException(context.applicationContext.getString(R.string.err_job_io, "Bluetooth UUIDs are missing"))
}
device.createInsecureRfcommSocketToServiceRecord(device.uuids.first().uuid)
}
val clazz = socket.remoteDevice.javaClass
Expand Down

0 comments on commit ca8c98f

Please sign in to comment.