This commit is contained in:
smileomi18@gmail.com
2023-07-27 17:41:32 +05:30
parent b21f1c8eaa
commit 0dd8e6b805
2 changed files with 1 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ android {
namespace 'in.sminnovations.hpostesting'
defaultConfig {
applicationId "in.sminnovations.hpostesting.prod"
applicationId "in.sminnovations.hpostesting"
minSdk 21
targetSdk 33
versionCode 2

View File

@@ -24,7 +24,6 @@ class UsbService : Service() {
private val TAG = "UsbService"
inner class UsbServiceBinder : Binder() {
// Return this instance of UsbService so clients can call public methods
fun getService(): UsbService = this@UsbService
}
@@ -39,14 +38,12 @@ class UsbService : Service() {
mPort = driver.ports[0] // Most devices have just one port (port 0)
mPort.open(connection)
mPort.setParameters(115200, 8, UsbSerialPort.STOPBITS_1, UsbSerialPort.PARITY_NONE)
//
isUsbConnected = true
Log.d(TAG, "My Usb Connected ${mPort.driver}")
val usbIoManager = SerialInputOutputManager(mPort,
object : SerialInputOutputManager.Listener{
override fun onNewData(data: ByteArray?) {
// Log.e(TAG, "onNewData() called inside eventDrivenWrite()")
listener?.onUsbRead(data)
}
override fun onRunError(e: Exception?) {