Launch native apps from custom cordova app

烈酒焚心 提交于 2019-12-06 07:24:50

Videos (default app for android),

Requires InAppBrowser Plugin to be installed. In your code simply call cordova.InAppBrowser.open('videos://', '_system', 'location=yes');

Pictures / Camera Roll (default app for android) & Camera

Requires Camera Plugin. navigator.camera.getPicture(cameraSuccess, cameraError, cameraOptions);

Settings

Check out this Native Settings Plugin

Browser window with blank or home page opened.

Requires InAppBrowser Plugin to be installed. In your code simply call cordova.InAppBrowser.open('http://google.org', '_system', 'location=yes'); This will open the default browser installed.

Many apps have well known URL Schemes defined that you can use to open app directly with. Heres a list. Whichever app URL you're using, make sure you add it to your whitelist in config.xml. <allow-intent href="twitter:*" /> <allow-intent href="mailto:*" /> The more recent approach is to use Universal Links as apposed to the URL.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!