PhoneGap CLI project won't bring up dialer/sms/email...and no error messages
here code far. let me know if missing piece of puzzle.
csp meta -
<meta http-equiv="content-security-policy"
content="default-src *;
style-src 'self' 'unsafe-inline' 'unsafe-eval';
script-src 'self' 'unsafe-inline' 'unsafe-eval';">
js code -
document.location.href = 'tel:1-913-484-9948';
window.plugins.callnumber.callnumber(onsuccess, onerror, number, 1);
config.xml
<content src="index.html" />
<plugin name="cordova-plugin-whitelist" spec="1" />
<access origin="tel:*" launch-external="yes"/>
<access origin="sms:*" launch-external="yes"/>
<access origin="mailto:*" launch-external="yes"/>
<access origin="geo:*" launch-external="yes" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<preference name="orientation" value="portrait" />
<engine name="android" spec="~4.1.1" />
<preference name="android-minsdkversion" value="14" />
<engine name="ios" spec="~3.9.2" />
</widget>
i don't see callnumber plugin installed. if is, should ensure saved config.xml via "cordova plugin add ... --save". if you're intending on using callnumber, i'd comment out location.href line.
the allow-intent tel: in config.xml file should sufficient; i'd remove access-origin lines tel:.
of course, might not ever executing code you've listed. can use debugger or console.log("...") verify getting right portion of code.
More discussions in PhoneGap
adobe
Comments
Post a Comment