0 like 0 dislike
193 views
in M1 by Q&A Freshman (102 points)

Hi, I've got Telpo M1 to integrate and found an error while integrating on my project and the sample project came from DemoSDK20230423_V2.5 C1. I know it's SDK for C1 but the vendor only send that file.

When init the SDK or calling anything from SDK it will produce error like this:
 

Accessing hidden method Ldalvik/system/VMRuntime;->setHiddenApiExemptions([Ljava/lang/String;)V (blacklist,core-platform-api, reflection, denied)

23:13:52.077  W  java.lang.reflect.InvocationTargetException

23:13:52.078  W  at java.lang.reflect.Method.invoke(Native Method)

23:13:52.078  W  at com.common.apiutil.util.SystemUtil.releaseReflectionLimit(SystemUtil.java:256)

23:13:52.078  W  at com.common.apiutil.fingerprint.FingerPrint.init(FingerPrint.java:18)

23:13:52.078  W  at com.common.apiutil.util.PowerUtil.<init>(PowerUtil.java:14)

23:13:52.078  W  at com.common.apiutil.util.SDKUtil.initSDK(SDKUtil.java:49)

23:13:52.078  W  at com.telpo.tps550.api.demo.MyApplication.onCreate(MyApplication.java:50)

23:13:52.078  W  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)

23:13:52.078  W  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6734)

23:13:52.078  W  at android.app.ActivityThread.access$1300(ActivityThread.java:238)

23:13:52.078  W  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1914)

23:13:52.078  W  at android.os.Handler.dispatchMessage(Handler.java:106)

23:13:52.078  W  at android.os.Looper.loop(Looper.java:223)

23:13:52.079  W  at android.app.ActivityThread.main(ActivityThread.java:7701)

23:13:52.079  W  at java.lang.reflect.Method.invoke(Native Method)

23:13:52.079  W  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)

23:13:52.079  W  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)

23:13:52.079  W  Caused by: java.lang.NoSuchMethodException: dalvik.system.VMRuntime.setHiddenApiExemptions [class [Ljava.lang.String;]

23:13:52.079  W  at java.lang.Class.getMethod(Class.java:2072)

23:13:52.079  W  at java.lang.Class.getDeclaredMethod(Class.java:2050)

23:13:52.079  W  ... 16 more

23:13:52.082  W  android.content.pm.PackageManager$NameNotFoundException: Application package com.common.service not found

23:13:52.082  W  at android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2323)

23:13:52.083  W  at android.app.ContextImpl.createPackageContext(ContextImpl.java:2294)

23:13:52.084  W  at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:927)

23:13:52.084  W  at com.common.apiutil.fingerprint.FingerPrint.init(FingerPrint.java:21)

23:13:52.085  W  at com.common.apiutil.util.PowerUtil.<init>(PowerUtil.java:14)

23:13:52.085  W  at com.common.apiutil.util.SDKUtil.initSDK(SDKUtil.java:49)

23:13:52.085  W  at com.telpo.tps550.api.demo.MyApplication.onCreate(MyApplication.java:50)

23:13:52.085  W  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1193)

23:13:52.085  W  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6734)

23:13:52.085  W  at android.app.ActivityThread.access$1300(ActivityThread.java:238)

23:13:52.085  W  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1914)

23:13:52.085  W  at android.os.Handler.dispatchMessage(Handler.java:106)

23:13:52.087  W  at android.os.Looper.loop(Looper.java:223)

23:13:52.088  W  at android.app.ActivityThread.main(ActivityThread.java:7701)

23:13:52.088  W  at java.lang.reflect.Method.invoke(Native Method)

23:13:52.089  W  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)

23:13:52.090  W  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)

the mContext is = android.app.ContextImpl@a5d63c2

23:14:44.628  W  the mService is = com.common.sdk.thermalprinter.IThermalPrinterService$Stub$Proxy@834c5d3

23:14:44.631  W  Accessing hidden method Lcom/common/sdk/thermalprinter/ThermalPrinterServiceManager;->measureText(Ljava/lang/String;)I (blacklist, reflection, denied)

23:14:44.632  W  java.lang.NoSuchMethodException: com.common.sdk.thermalprinter.ThermalPrinterServiceManager.measureText [class java.lang.String]

23:14:44.643  W  at java.lang.Class.getMethod(Class.java:2072)

23:14:44.643  W  at java.lang.Class.getMethod(Class.java:1693)

23:14:44.643  W  at com.common.apiutil.printer.NewUsbThermalPrinter.measureText(NewUsbThermalPrinter.java:1414)

23:14:44.643  W  at com.common.apiutil.printer.UsbThermalPrinter.measureText(UsbThermalPrinter.java:893)

23:14:44.644  W  at com.telpo.tps550.api.demo.printer.UsbPrinterActivity$13.onClick(UsbPrinterActivity.java:735)

23:14:44.644  W  at android.view.View.performClick(View.java:7448)

23:14:44.644  W  at android.view.View.performClickInternal(View.java:7425)

23:14:44.644  W  at android.view.View.access$3600(View.java:810)

23:14:44.644  W  at android.view.View$PerformClick.run(View.java:28309)

23:14:44.644  W  at android.os.Handler.handleCallback(Handler.java:938)

23:14:44.644  W  at android.os.Handler.dispatchMessage(Handler.java:99)

23:14:44.644  W  at android.os.Looper.loop(Looper.java:223)

23:14:44.644  W  at android.app.ActivityThread.main(ActivityThread.java:7701)

23:14:44.644  W  at java.lang.reflect.Method.invoke(Native Method)

23:14:44.644  W  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)

23:14:44.644  W  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)

23:14:44.646  W  com.common.apiutil.InternalErrorException

23:14:44.648  W  at com.common.apiutil.printer.NewUsbThermalPrinter.measureText(NewUsbThermalPrinter.java:1417)

23:14:44.649  W  at com.common.apiutil.printer.UsbThermalPrinter.measureText(UsbThermalPrinter.java:893)

23:14:44.651  W  at com.telpo.tps550.api.demo.printer.UsbPrinterActivity$13.onClick(UsbPrinterActivity.java:735)

23:14:44.651  W  at android.view.View.performClick(View.java:7448)

23:14:44.651  W  at android.view.View.performClickInternal(View.java:7425)

23:14:44.651  W  at android.view.View.access$3600(View.java:810)

23:14:44.651  W  at android.view.View$PerformClick.run(View.java:28309)

23:14:44.651  W  at android.os.Handler.handleCallback(Handler.java:938)

23:14:44.651  W  at android.os.Handler.dispatchMessage(Handler.java:99)

23:14:44.651  W  at android.os.Looper.loop(Looper.java:223)

23:14:44.652  W  at android.app.ActivityThread.main(ActivityThread.java:7701)

23:14:44.652  W  at java.lang.reflect.Method.invoke(Native Method)

23:14:44.652  W  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)

23:14:44.652  W  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:952)


The errors taken from telpo sample code

The first issue I notice is missing com.common.service

and the other issue is failed to call functions using java reflection.

how to fix that?
Thanks

 

Please log in or register to answer this question.

1 Answer

0 like 0 dislike
by Q&A Professional (5.4k points)
Hello, thank you for your feedback.
Your M1 seems to lack the service of the new architecture SDK.

I will send this service application to you by email. Please check it.

Thank you.
by Q&A Freshman (102 points)
0 0
Hi Elden, I have not received any email, could you please send me again?
by Q&A Professional (5.4k points)
0 0
Sorry for the late reply. I have sent you the email, please check it. Thank you
by Q&A Freshman (102 points)
0 0
Hi, here's the update, after installing the service APK, it seems the printer still wont connect. here's the log:


22:42:01.375  W  Accessing hidden method Ldalvik/system/VMRuntime;->setHiddenApiExemptions([Ljava/lang/String;)V (blacklist,core-platform-api, reflection, denied)
22:42:01.376  W  java.lang.reflect.InvocationTargetException
22:42:01.376  W      at java.lang.reflect.Method.invoke(Native Method)
22:42:01.376  W      at com.telpo.tps550.api.util.SystemUtil.releaseReflectionLimit(SystemUtil.java:444)
22:42:01.376  W      at com.telpo.tps550.api.util.SystemUtil.getProperty(SystemUtil.java:130)
22:42:01.376  W      at com.telpo.tps550.api.util.SystemUtil.getInternalModel(SystemUtil.java:166)
22:42:01.377  W      at com.telpo.tps550.api.printer.ThermalPrinter.start(ThermalPrinter.java:456)
22:42:01.378  W      at java.lang.reflect.Method.invoke(Native Method)
22:42:01.378  W      at com.common.apiutil.printer.ThermalPrinter.start(ThermalPrinter.java:185)
22:42:01.378  W      at com.telpo.tps550.api.demo.printer.PrinterActivity$contentPrintThread.run(PrinterActivity.java:1015)
22:42:01.378  W  Caused by: java.lang.NoSuchMethodException: dalvik.system.VMRuntime.setHiddenApiExemptions [class [Ljava.lang.String;]
22:42:01.378  W      at java.lang.Class.getMethod(Class.java:2072)
22:42:01.378  W      at java.lang.Class.getDeclaredMethod(Class.java:2050)
22:42:01.378  W      ... 8 more
22:42:01.379  W  Accessing hidden method Ldalvik/system/VMRuntime;->setHiddenApiExemptions([Ljava/lang/String;)V (blacklist,core-platform-api, reflection, denied)
22:42:01.379  W  java.lang.reflect.InvocationTargetException
22:42:01.379  W      at java.lang.reflect.Method.invoke(Native Method)
22:42:01.380  W      at com.telpo.tps550.api.util.SystemUtil.releaseReflectionLimit(SystemUtil.java:444)
22:42:01.380  W      at com.telpo.tps550.api.util.SystemUtil.getProperty(SystemUtil.java:130)
22:42:01.380  W      at com.telpo.tps550.api.util.SystemUtil.getInternalModel(SystemUtil.java:166)
22:42:01.380  W      at com.telpo.tps550.api.printer.ThermalPrinter.start(ThermalPrinter.java:457)
22:42:01.380  W      at java.lang.reflect.Method.invoke(Native Method)
22:42:01.380  W      at com.common.apiutil.printer.ThermalPrinter.start(ThermalPrinter.java:185)
22:42:01.380  W      at com.telpo.tps550.api.demo.printer.PrinterActivity$contentPrintThread.run(PrinterActivity.java:1015)
22:42:01.380  W  Caused by: java.lang.NoSuchMethodException: dalvik.system.VMRuntime.setHiddenApiExemptions [class [Ljava.lang.String;]
22:42:01.380  W      at java.lang.Class.getMethod(Class.java:2072)
22:42:01.381  W      at java.lang.Class.getDeclaredMethod(Class.java:2050)
22:42:01.381  W      ... 8 more
22:42:01.381  W  Accessing hidden method Ldalvik/system/VMRuntime;->setHiddenApiExemptions([Ljava/lang/String;)V (blacklist,core-platform-api, reflection, denied)
22:42:01.381  W  java.lang.reflect.InvocationTargetException
22:42:01.381  W      at java.lang.reflect.Method.invoke(Native Method)
22:42:01.381  W      at com.telpo.tps550.api.util.SystemUtil.releaseReflectionLimit(SystemUtil.java:444)
22:42:01.382  W      at com.telpo.tps550.api.util.SystemUtil.getProperty(SystemUtil.java:130)
22:42:01.382  W      at com.telpo.tps550.api.util.SystemUtil.getInternalModel(SystemUtil.java:166)
22:42:01.382  W      at com.telpo.tps550.api.printer.ThermalPrinter.start(ThermalPrinter.java:458)
22:42:01.382  W      at java.lang.reflect.Method.invoke(Native Method)
22:42:01.382  W      at com.common.apiutil.printer.ThermalPrinter.start(ThermalPrinter.java:185)
22:42:01.382  W      at com.telpo.tps550.api.demo.printer.PrinterActivity$contentPrintThread.run(PrinterActivity.java:1015)
22:42:01.382  W  Caused by: java.lang.NoSuchMethodException: dalvik.system.VMRuntime.setHiddenApiExemptions [class [Ljava.lang.String;]
22:42:01.382  W      at java.lang.Class.getMethod(Class.java:2072)
22:42:01.382  W      at java.lang.Class.getDeclaredMethod(Class.java:2050)
22:42:01.383  W      ... 8 more
22:42:01.383  D  printer start fail
22:42:01.383  W  com.common.apiutil.InternalErrorException
22:42:01.384  W      at com.common.apiutil.printer.ThermalPrinter.throwException(ThermalPrinter.java:1111)
22:42:01.384  W      at com.common.apiutil.printer.ThermalPrinter.start(ThermalPrinter.java:190)
22:42:01.384  W      at com.telpo.tps550.api.demo.printer.PrinterActivity$contentPrintThread.run(PrinterActivity.java:1015)
22:42:05.460  W  Frame time is 0.087628 ms in the future!  Check that graphics HAL is generating vsync timestamps using the correct timebase.
by Q&A Professional (5.4k points)
0 0
Hello, maybe this SDK version is not suitable for your M1. I have sent you another SDK link by email, please check it, thank you.

Related questions

0 like 0 dislike
1 answer 110 views
asked in M8 by cugwuh Q&A Freshman (104 points)
0 like 0 dislike
2 answers 309 views
asked in TPS900 by Batsh Q&A Freshman (102 points)
0 like 0 dislike
1 answer 26 views
asked in M10 by Juan Mamani Ajata Q&A Freshman (102 points)
0 like 0 dislike
1 answer 40 views
0 like 0 dislike
1 answer 126 views
asked in TPS320 by Nanakromo Q&A Freshman (102 points)
0 like 0 dislike
1 answer 136 views
0 like 0 dislike
1 answer 213 views
0 like 0 dislike
1 answer 274 views
asked in TPS900 by kigbu_ai Q&A Freshman (108 points)
0 like 0 dislike
1 answer 124 views
asked in TPS530 by bnmara Q&A Freshman (102 points)
0 like 0 dislike
1 answer 159 views
asked in K8 by Sthing Q&A Freshman (105 points)
Welcome to Telpo Q&A,

If you have a technical question ,please ask here, in English.
.
If you have faulty devices need be repaired,please create a issue ticket.

Please inquiry your ticket.

Notice :If you have an urgent question or cannot register account of Q&A, you can contact the online support in below jivochat .

Categories

...