phonegap调用发送短信页面

phonegap的Android页面中,点某个链接可以直接到发送短信页面或者发送邮箱页面或者拨打电话页面等,可以用<a>标签实现,与普通html没有区别。但是在phonegap中需要配置权限。

 

res\xml\config.xml:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example.hello" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<preference name="loglevel" value="DEBUG" />
<name>HelloWord</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="dev@cordova.apache.org" href="http://cordova.io">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<access origin="tel:*" launch-external="yes"/>

<access origin="geo:*" launch-external="yes"/>

<access origin="mailto:*" launch-external="yes"/>

<access origin="sms:*" launch-external="yes"/>

<access origin="market:*" launch-external="yes"/>

<feature name="EmailComposer">
<param name="android-package" value="de.appplant.cordova.emailcomposer.EmailComposer" />
</feature>
</widget>

相关推荐