I have a phonegap application and a native android application, both created in eclipse for myself, what I need is from my phonegap app, open my native app by webintent, what I have is the following
window.plugins.webintent.startActivity(
{
action: 'prueba.prueba.Draw.UNIQUESTRING',
},
function() {},
function() {alert('Failed to open URL via Android Intent')}
);
This was a call to an activity in my phonegap app called Draw.java, however I need is to open the DrawingActivity.java activity that is in my native app, the native app called Draw, and the package containing the activity is com.codepath.example.customviewdemo.activities.
In the Manifest.xml of the phonegap app:
<intent-filter>
<action android:name="prueba.prueba.Draw.UNIQUESTRING" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
prueba.prueba.Draw is an Activity in my phonegap app, but I need open an Antivity of an external app; Attached is a picture with the structure of my two projects, the phonegap project and the native project, the name of my phonegap project is pruebaInput, and the name of my native project if draw.
I appreciate any help
First, make intent-filter
on activity of native app.
<intent-filter>
<action android:name="com.codepath.example.customviewdemo.activities" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Secend, use webintent plugin
on phonegap app.
window.plugins.webintent.startActivity(
{
action: 'com.codepath.example.customviewdemo.activities',
},
function() {},
function() {alert('Failed to open URL via Android Intent')}
);
Good bless you :)