如何在 phonegap 中打开另一个由 webintent 为我制作的应用程序?

How can I open another app made for me from webintent in phonegap?

我有一个 phonegap 应用程序和一个本机 android 应用程序,都是在 eclipse 中为我自己创建的,我需要的是我的 phonegap 应用程序,通过 webintent 打开我的本机应用程序,我有以下内容

window.plugins.webintent.startActivity(
    {
        action: 'prueba.prueba.Draw.UNIQUESTRING',
    }, 
    function() {}, 
    function() {alert('Failed to open URL via Android Intent')}
 );

这是对我名为 Draw.java 的 phonegap 应用程序中的 activity 的调用,但我需要打开我的本机应用程序中的 DrawingActivity.java activity ,名为 Draw 的本机应用程序,包含 activity 的包是 com.codepath.example.customviewdemo.activities.

在 phonegap 应用程序的 Manifest.xml 中:

<intent-filter>
    <action android:name="prueba.prueba.Draw.UNIQUESTRING" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

prueba.prueba.Draw 是我的 phonegap 应用程序中的 Activity,但我需要打开外部应用程序的 Antivity;附上我的phonegap工程和native工程两个工程的结构图,我的phonegap工程名字是pruebaInput,我的native工程名字是draw。

The image here

感谢任何帮助

首先,在原生应用activity上制作intent-filter

<intent-filter>
    <action android:name="com.codepath.example.customviewdemo.activities" />
    <category android:name="android.intent.category.DEFAULT" />
</intent-filter>

第二,在 phonegap 应用程序上使用 webintent plugin

window.plugins.webintent.startActivity(
    {
        action: 'com.codepath.example.customviewdemo.activities',
    }, 
    function() {}, 
    function() {alert('Failed to open URL via Android Intent')}
 );

祝福你:)