Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions .idea/libraries/Dart_SDK.xml

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

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"githubPullRequests.ignoredPullRequestBranches": ["main"]
}
2 changes: 1 addition & 1 deletion android/.idea/gradle.xml

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

3 changes: 3 additions & 0 deletions android/.idea/modules.xml

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

4 changes: 2 additions & 2 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ group 'com.tlt.epson_epos'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Expand Down
Binary file modified android/libs/ePOS2.jar
Binary file not shown.
Binary file modified android/libs/ePOSEasySelect.jar
Binary file not shown.
Binary file modified android/src/main/jniLibs/arm64-v8a/libepos2.so
Binary file not shown.
Binary file modified android/src/main/jniLibs/arm64-v8a/libeposeasyselect.so
Binary file not shown.
Binary file modified android/src/main/jniLibs/armeabi-v7a/libepos2.so
Binary file not shown.
Binary file modified android/src/main/jniLibs/armeabi-v7a/libeposeasyselect.so
Binary file not shown.
Binary file modified android/src/main/jniLibs/armeabi/libepos2.so
Binary file not shown.
Binary file modified android/src/main/jniLibs/armeabi/libeposeasyselect.so
Binary file not shown.
Binary file added android/src/main/jniLibs/x86/libepos2.so
Binary file not shown.
Binary file added android/src/main/jniLibs/x86/libeposeasyselect.so
Binary file not shown.
Binary file added android/src/main/jniLibs/x86_64/libepos2.so
Binary file not shown.
Binary file not shown.
25 changes: 16 additions & 9 deletions android/src/main/kotlin/com/tlt/epson_epos/EpsonEposPlugin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ class EpsonEposPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {
"Printing $target $series Connection: ${statusInfo?.connection} online: ${statusInfo?.online} cover: ${statusInfo?.coverOpen} Paper: ${statusInfo?.paper} ErrorSt: ${statusInfo?.errorStatus} Battery Level: ${statusInfo?.batteryLevel}"
)
mPrinter!!.sendData(Printer.PARAM_DEFAULT)
mPrinter!!.disconnect();
mPrinter!!.clearCommandBuffer()
Log.d(logTag, "Printed $target $series")

resp.success = true
Expand All @@ -395,15 +397,20 @@ class EpsonEposPlugin : FlutterPlugin, MethodCallHandler, ActivityAware {

private val mDiscoveryListener = DiscoveryListener { deviceInfo ->
Log.d(logTag, "Found: ${deviceInfo?.deviceName}")
if (deviceInfo?.deviceName != null && deviceInfo?.deviceName != "") {
var printer = EpsonEposPrinterInfo(deviceInfo.ipAddress, deviceInfo.bdAddress , deviceInfo.macAddress, deviceInfo.deviceName , deviceInfo.deviceType.toString(), deviceInfo.deviceType.toString() , deviceInfo.target)
var printerIndex = printers.indexOfFirst { e -> e.ipAddress == deviceInfo.ipAddress }
if (printerIndex > -1) {
printers[printerIndex] = printer
} else {
printers.add(printer)
}
}

//Increase connection support
var printer = EpsonEposPrinterInfo(deviceInfo.ipAddress, deviceInfo.bdAddress , deviceInfo.macAddress, deviceInfo.deviceName , deviceInfo.deviceType.toString(), deviceInfo.deviceType.toString() , deviceInfo.target)
printers.add(printer)

// if (deviceInfo?.deviceName != null && deviceInfo?.deviceName != "") {
// var printer = EpsonEposPrinterInfo(deviceInfo.ipAddress, deviceInfo.bdAddress , deviceInfo.macAddress, deviceInfo.deviceName , deviceInfo.deviceType.toString(), deviceInfo.deviceType.toString() , deviceInfo.target)
// var printerIndex = printers.indexOfFirst { e -> e.ipAddress == deviceInfo.ipAddress }
// if (printerIndex > -1) {
// printers[printerIndex] = printer
// } else {
// printers.add(printer)
// }
// }

}

Expand Down
Loading