android.content.ActivityNotFoundException: No Activity found to handle null

31 views Asked by At

I am trying to run the android 12 print method on a sunmi V2s device from the plugin: cordova-plugin-printer, but it returns the following error:

FATAL EXCEPTION: pool-2-thread-1
Process: io.ionic.starter, PID: 18359
android.content.ActivityNotFoundException: No Activity found to handle null
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2087)
at android.app.Activity.startIntentSenderForResultInner(Activity.java:5716)
at android.app.Activity.startIntentSenderForResult(Activity.java:5682)
at androidx.activity.ComponentActivity.startIntentSenderForResult(ComponentActivity.java:772)
at android.app.Activity.startIntentSenderForResult(Activity.java:5649)
at androidx.activity.ComponentActivity.startIntentSenderForResult(ComponentActivity.java:750)
at android.app.Activity.startIntentSender(Activity.java:5896)
at android.app.Activity.startIntentSender(Activity.java:5862)
at android.print.PrintManager.print(PrintManager.java:538)
at de.appplant.cordova.plugin.printer.PrintManager.printAdapter(PrintManager.java:265)
at de.appplant.cordova.plugin.printer.PrintManager.printPdf(PrintManager.java:250)
at de.appplant.cordova.plugin.printer.PrintManager.print(PrintManager.java:126)
at de.appplant.cordova.plugin.printer.Printer.lambda$print$3$de-appplant-cordova-plugin-printer-Printer(Printer.java:131)
at de.appplant.cordova.plugin.printer.Printer$$ExternalSyntheticLambda2.run(Unknown Source:8)
                                                                                                    

The error is returned when I try to do the following: mContext.startIntentSender(intent, null, 0, 0, 0); This code is from Android sdk.

I have used in the Android Studio compiler the following Android 12, API 31.

I have compiled the application on other mobiles and it opens correctly the print interface, but on this particular sunmi V2s it doesn't let me.

Will the print method be called differently on these devices or will it have some special permission?

I would appreciate your comments.

I tried to raise the android print interface but my application closes when I perform this action.

0

There are 0 answers