发送和阅读,通过原生短信应用科尔多瓦发送的短信内容科尔、短信内容、多瓦、短信

由网友(你非良人i)分享简介:我要建离子/科尔多瓦应用程序。从我的应用程序,用户可以以发送短信点击一个电话号码。当这个数字点击,原生短信应用程序将打开,然后用户可以输入他/她自己的短信和发送短信。有什么办法,从我的应用程序,我可以得到短信内容吗?在此先感谢。解决方案 当你使用离子/科尔多瓦,短信插件需要做这样的工作。 此外jsmobile短信插件...

我要建离子/科尔多瓦应用程序。从我的应用程序,用户可以以发送短信点击一个电话号码。当这个数字点击,原生短信应用程序将打开,然后用户可以输入他/她自己的短信和发送短信。有什么办法,从我的应用程序,我可以得到短信内容吗?

在此先感谢。

解决方案

当你使用离子/科尔多瓦,短信插件需要做这样的工作。

此外jsmobile短信插件,还有另外一个具有多个API: http://plugins.cordova.io/#/package/com.rjfun .cordova.sms

正如在描述:

  sendSMS(地址(S),文本,successCallback,failureCallback);
listSMS(过滤器,successCallback,failureCallback);
deleteSMS(过滤器,successCallback,failureCallback);

startWatch(successCallback,failureCallback);
秒表(successCallback,failureCallback);

enableIntercept(ON_OFF,successCallback,failureCallback);
restoreSMS(msg_or_msgs,successCallback,failureCallback);
 

活动

 onSMSArrive
 

您可以得到短信内容中通过以下方式:

实现UI,让用户的输入,并调用插件的API发送短信。

或者

让默认SMS应用程序发送消息,然后读取从发件箱中的短信。

顺便说一句,该插件适用于Android的唯一的,仅供参考。

除了工资,别忘还有这笔钱可以领 手把手教你申领方式

I'm building an ionic/cordova app. From my application, user can click on a phone number in order to send SMS. When click on that number, native SMS app will open and then user can type his/her own SMS and send the SMS. Is there any way, from my app I can get the SMS content?

Thanks in advance.

解决方案

As you are using ionic/cordova, a SMS plugin is required to do such work.

Besides jsmobile SMS plugin, there is another one with more APIs: http://plugins.cordova.io/#/package/com.rjfun.cordova.sms

As mentioned in the description:

sendSMS(address(s), text, successCallback, failureCallback);
listSMS(filter, successCallback, failureCallback);
deleteSMS(filter, successCallback, failureCallback);

startWatch(successCallback, failureCallback);
stopWatch(successCallback, failureCallback);

enableIntercept(on_off, successCallback, failureCallback);
restoreSMS(msg_or_msgs, successCallback, failureCallback);

Events

'onSMSArrive'

You can get the SMS content in either of the following ways:

implement the UI, get user's input, and call plugin's API to send the SMS.

Or,

let the default SMS app send the message, then read the SMS from the sent box.

BTW, the plugin works for Android only, FYI.

阅读全文

相关推荐

最新文章