Open another application from your application in cordova

Posted By : Akhil Dhiman | 12-Jun-2015
Here I will show you how to open another application from your application. You can check this plugin from below link
 
To install this plugin you need to follow below instructions:
cordova plugin add https://github.com/lampaa/com.lampa.startapp.git
 
Below are the methods to open application :

For Android

Check wheater application is installed or not
navigator.startApp.check("com.application.name", function(message) { /* success */
    console.log(message); // => OK
}, 
function(error) { /* error */
    console.log(error);
});
 
Start application
navigator.startApp.start("com.application.name", function(message) {  /* success */
    console.log(message); // => OK
}, 
function(error) { /* error */
    console.log(error);
});
 

For iOS

Check wheater application is installed or not
navigator.startApp.check("twitter://", function(message) { /* success */
    console.log(message); // => OK
}, 
function(error) { /* error */
    console.log(error);
});
 
Start application
navigator.startApp.start("twitter://", function(message) { /* success */
    console.log(message); // => OK
}, 
function(error) { /* error */
    console.log(error);
});
 

About Author

Author Image
Akhil Dhiman

Akhil is an iPhone and Android application developer with experience in PhoneGap and Swift(Native iOS). Akhil has good experience working with JavaScript, jQuery and Underscore as well.

Request for Proposal

Name is required

Comment is required

Sending message..