bluetooth_print icon indicating copy to clipboard operation
bluetooth_print copied to clipboard

Can not get the plugin work on android sdk 29

Open richard457 opened this issue 4 years ago • 9 comments

here is my build.gradle file ` compileSdkVersion 29

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
    disable 'InvalidPackage'
}

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.com"
    minSdkVersion 22
    targetSdkVersion 29
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}`

And When I try to print I get this error Attempt to invoke virtual method 'com.example.bluetooth_print.PrinterCommand com.example.bluetooth_print.DeviceConnFactoryManager.getCurrentPrinterCommand()' on a null object reference E/AndroidRuntime(32188): at com.example.bluetooth_print.BluetoothPrintPlugin$5.run(BluetoothPrintPlugin.java:326) E/AndroidRuntime(32188): at com.example.bluetooth_print.ThreadPool$1.run(ThreadPool.java:78) E/AndroidRuntime(32188): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) E/AndroidRuntime(32188): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) E/AndroidRuntime(32188): at java.lang.Thread.run(Thread.java:919) I/Process (32188): Sending signal. PID: 32188 SIG: 9

Note on android sdk 28 works as expected.

richard457 avatar Sep 27 '20 20:09 richard457

@thon-ju any comment here?

richard457 avatar Sep 28 '20 11:09 richard457

This a is problem for me as well. The example works for sdk28 but not sdk29. My existing app is using skd29. I would appreciate if someone can help me getting it to work for skd29. Thank you in advance. @thon-ju

msandwidi avatar Oct 06 '20 15:10 msandwidi

@thon-ju same issue here is there any workaround ??

UnluckyY1 avatar Nov 04 '20 15:11 UnluckyY1

@thon-ju same issue here is there any workaround ??

Nope. i didn't find any.

msandwidi avatar Nov 05 '20 00:11 msandwidi

anything update yet?

lyseiha avatar Nov 05 '20 03:11 lyseiha

Use bluetooth_thermal_printer library

Rajath4 avatar Nov 30 '20 04:11 Rajath4

Use bluetooth_thermal_printer library

I have seen this one but was wondering if I could get one that support android and ios. Thank you for the help

msandwidi avatar Nov 30 '20 19:11 msandwidi

This seems to support it though have not tested it yet!

On Mon, Nov 30, 2020, 9:43 PM MSandwidi [email protected] wrote:

Use bluetooth_thermal_printer https://pub.dev/packages/bluetooth_thermal_printer library

I have seen this one but was wondering if I could get one that support android and ios. Thank you for the help

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/thon-ju/bluetooth_print/issues/30#issuecomment-736000311, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBCOJBOG6BNPPBNHC3CNATSSPYXDANCNFSM4R3X5PQA .

richard457 avatar Nov 30 '20 20:11 richard457

This seems to support it though have not tested it yet! On Mon, Nov 30, 2020, 9:43 PM MSandwidi @.***> wrote: Use bluetooth_thermal_printer https://pub.dev/packages/bluetooth_thermal_printer library I have seen this one but was wondering if I could get one that support android and ios. Thank you for the help — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#30 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACBCOJBOG6BNPPBNHC3CNATSSPYXDANCNFSM4R3X5PQA .

The documentation must have mislead me. Thank you, I will try it then

msandwidi avatar Dec 01 '20 23:12 msandwidi