Crashing with following error
Stack trace:
java.lang.RuntimeException: Error receiving broadcast Intent { act=com.android.example.USB_PERMISSION flg=0x10 (has extras) } in com.example.mypospal_test.PrintEscPosActivity$2@9180682
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1590)
at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=0; index=4
at com.dantsu.escposprinter.textparser.PrinterTextParserImg.(PrinterTextParserImg.java:149)
at com.dantsu.escposprinter.textparser.PrinterTextParserImg.(PrinterTextParserImg.java:135)
at com.dantsu.escposprinter.textparser.PrinterTextParserColumn.appendImage(PrinterTextParserColumn.java:314)
at com.dantsu.escposprinter.textparser.PrinterTextParserColumn.(PrinterTextParserColumn.java:77)
at com.dantsu.escposprinter.textparser.PrinterTextParserLine.(PrinterTextParserLine.java:46)
at com.dantsu.escposprinter.textparser.PrinterTextParser.parse(PrinterTextParser.java:232)
at com.dantsu.escposprinter.EscPosPrinter.printFormattedText(EscPosPrinter.java:118)
at com.dantsu.escposprinter.EscPosPrinter.printFormattedText(EscPosPrinter.java:100)
at com.dantsu.escposprinter.EscPosPrinter.printFormattedText(EscPosPrinter.java:89)
at com.example.mypospal_test.PrintEscPosActivity.startPrinint(PrintEscPosActivity.java:114)
at com.example.mypospal_test.PrintEscPosActivity.access$000(PrintEscPosActivity.java:36)
at com.example.mypospal_test.PrintEscPosActivity$2.onReceive(PrintEscPosActivity.java:66)
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1580)
... 8 more
Crashing with following error
Stack trace:
java.lang.RuntimeException: Error receiving broadcast Intent { act=com.android.example.USB_PERMISSION flg=0x10 (has extras) } in com.example.mypospal_test.PrintEscPosActivity$2@9180682
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1590)
at android.app.-$$Lambda$LoadedApk$ReceiverDispatcher$Args$_BumDX2UKsnxLVrE6UJsJZkotuA.run(Unknown Source:2)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7664)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.ArrayIndexOutOfBoundsException: length=0; index=4
at com.dantsu.escposprinter.textparser.PrinterTextParserImg.(PrinterTextParserImg.java:149)
at com.dantsu.escposprinter.textparser.PrinterTextParserImg.(PrinterTextParserImg.java:135)
at com.dantsu.escposprinter.textparser.PrinterTextParserColumn.appendImage(PrinterTextParserColumn.java:314)
at com.dantsu.escposprinter.textparser.PrinterTextParserColumn.(PrinterTextParserColumn.java:77)
at com.dantsu.escposprinter.textparser.PrinterTextParserLine.(PrinterTextParserLine.java:46)
at com.dantsu.escposprinter.textparser.PrinterTextParser.parse(PrinterTextParser.java:232)
at com.dantsu.escposprinter.EscPosPrinter.printFormattedText(EscPosPrinter.java:118)
at com.dantsu.escposprinter.EscPosPrinter.printFormattedText(EscPosPrinter.java:100)
at com.dantsu.escposprinter.EscPosPrinter.printFormattedText(EscPosPrinter.java:89)
at com.example.mypospal_test.PrintEscPosActivity.startPrinint(PrintEscPosActivity.java:114)
at com.example.mypospal_test.PrintEscPosActivity.access$000(PrintEscPosActivity.java:36)
at com.example.mypospal_test.PrintEscPosActivity$2.onReceive(PrintEscPosActivity.java:66)
at android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args(LoadedApk.java:1580)
... 8 more