ActivityNotFoundException when attempting to launch Intent in Cordova

前端 未结 1 560
一整个雨季
一整个雨季 2021-01-27 03:20

How do I create an activity/intent in the android manifest to fix the error below...

I am using https://github.com/MaginSoft/MFileChooser and I can see the picker and th

相关标签:
1条回答
  • 2021-01-27 03:40

    The error is telling you that the device has no applications installed that are able to handle that particular implicit intent. You need to check whether an application is available before attempting to launch the intent like this:

    // Verify that there are applications registered to handle this intent
    // resolveActivity returns null if none are registered
    if (intent.resolveActivity(getPackageManager()) != null) {
        startActivity(intent);
    }
    
    0 讨论(0)
提交回复
热议问题