I am a newbie to cordova apps. In my app, I am trying to add webintent from https://github.com/Initsogar/cordova-webintent
.
When I run my code, I get the following in my logcat -
W/System.err(6378): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW typ=application/vnd.android.package-archive }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1545)
W/System.err(6378): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
W/System.err(6378): at android.app.Activity.startActivityForResult(Activity.java:3351)
W/System.err(6378): at android.app.Activity.startActivityForResult(Activity.java:3312)
W/System.err(6378): at android.app.Activity.startActivity(Activity.java:3522)
W/System.err(6378): at android.app.Activity.startActivity(Activity.java:3490)
at com.borismus.webintent.WebIntent.startActivity(WebIntent.java:204)
at com.borismus.webintent.WebIntent.execute(WebIntent.java:65)
at org.apache.cordova.CordovaPlugin.execute(CordovaPlugin.java:65)
at org.apache.cordova.PluginManager.execHelper(PluginManager.java:242)
at org.apache.cordova.PluginManager.exec(PluginManager.java:227)
at org.apache.cordova.ExposedJsApi.exec(ExposedJsApi.java:53)
at org.apache.cordova.CordovaChromeClient.onJsPrompt(CordovaChromeClient.java:229)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:655)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4744)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
I am using the following code to call webintent -
window.plugins.webintent.startActivity({
action: window.plugins.webintent.ACTION_VIEW,
url: 'http://www.google.com',
type: 'application/vnd.android.package-archive'
},
function() {},
function() {
alert('Failed to open URL via Android Intent.');
console.log("Failed to open URL via Android Intent.");
}
);
I have also added the required lines to config.xml as written in the github link. Please help me to solve my error.
This is due to protocol use https instead of http