ActivityNotFoundException when attempting to launch Intent in Cordova

◇◆丶佛笑我妖孽 提交于 2019-12-02 03:59:39

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);
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!