Reputation: 81
I have a PhoneGap application, which needs to communicate with an external iOS app on the same device. The external app will do some special processing, and return a unique value back to my PhoneGap app. PhoneGap app then uses this unique value to do some processing internally.
Given this use case, I have two questions
I have searched so far, but haven't found very relevant documentation. I have also tried to open another app using appname:/// strategy, hasn't worked for me.
Any help will be appreciated. thank you!
Upvotes: 1
Views: 3984
Reputation: 970
Cordova has wide range of plugins for performing different operations. For opening external application you can use: https://github.com/lampaa/com.lampa.startapp
If you want to open an application without using any plugin:
var iOS_specificUrl = 'custom_url_scheme://url-to-reach?parameter1=val1';
window.location = iOS_specificUrl;
or you can use inappbrowser
var iOS_specificUrl = 'custom_url_scheme://url-to-reach?parameter1=val1';
window.open(iOS_specificUrl, '_system');
Let's say you have app1 and want to open app2 then you need to assign custom url to app2 and for that you need to make changes in app2 configuration xml file; and to do this you can use following plugin: https://github.com/EddyVerbruggen/Custom-URL-scheme
Or if you want to open third party application then you need to get in touch with application provider for getting custom url.
Upvotes: 2