star-micronics / StarPRNT-SDK-Android-Java

StarPRNT SDK for Android including libraries for supporting application development for Star printers.
https://www.star-m.jp/products/s_print/sdk/starprnt_sdk/manual/android_java/en/index.html
Other
15 stars 4 forks source link

Can't print with portName BT: #3

Closed sharpwitz closed 3 years ago

sharpwitz commented 3 years ago

We are using two TSP650. One has Ethernet and the other has Bluetooth. We can print to the ethernet printer without issues, however, with Bluetooth, nothing happens. We had successfully paired the Android tablet to the printer.

Our AndroidManifest.xml includes

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-feature android:name="android.hardware.usb.host" />

Please advise any other code to watch out for.

https://github.com/star-micronics/StarPRNT-SDK-Android-Java/blob/master/SDK/app/src/main/java/com/starmicronics/starprntsdk/localizereceipts/EnglishReceiptsImpl.java

https://github.com/star-micronics/StarPRNT-SDK-Android-Java/blob/master/SDK/app/src/main/java/com/starmicronics/starprntsdk/PrinterSettingConstant.java

https://github.com/star-micronics/StarPRNT-SDK-Android-Java/blob/master/SDK/app/src/main/java/com/starmicronics/starprntsdk/PrinterSettings.java

https://github.com/star-micronics/StarPRNT-SDK-Android-Java/blob/master/SDK/app/src/main/java/com/starmicronics/starprntsdk/PrinterFragment.java

sharpwitz commented 3 years ago

We are using portName "BT:" but that does not seem to work manual

sharpwitz commented 3 years ago

We will answer our own question here. To get Bluetooth to work, we can only use port name "BT:" if the library is version 2.2.0 or newer

we are using StarIoExtManager (of starioextension library) v 1.15.0. com.starmicronics:stario library of verison 2.9.0 is on the classpath