在 Android 上通过 PhoneGap 发送短信

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3193997/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 09:06:07  来源:igfitidea点击:

Send SMS through PhoneGap on Android

androidsmscontactscordova

提问by Raghu

I am exploring capabilities and features of PhoneGap. I have gone through the PhoneGapsite. Is there any possibility (or) workaround to send text messages and access phonebook information of Android using the PhoneGap framework?

我正在探索 PhoneGap 的功能和特性。我浏览了PhoneGap网站。是否有可能(或)解决方法使用 PhoneGap 框架发送短信和访问 Android 的电话簿信息?

采纳答案by Robby Pond

Yes on both accounts. There are Contactsand SMSclasses as part of the Javascript API.

两个账户都是。作为Javascript API 的一部分,有ContactsSMS类。

回答by Martin Bories

The function is outdated.

该功能已过时。

But Plugins will get it work:

但是插件会让它工作:

According to the Roadmap planing, Phonegap will add a messaging API in summer 2012.

根据路线图规划,Phonegap 将在 2012 年夏季添加消息 API。

回答by James Hornitzky

You can also write phonegap plugins to achieve functions on top of phonegap (e.g. send SMS).

您也可以编写phonegap 插件来实现phonegap 之上的功能(例如发送短信)。

See the github project https://github.com/phonegap/phonegap-plugins.

查看 github 项目https://github.com/phonegap/phonegap-plugins

Basically the crux of it is that you can write native android (or other platform) code with inside the plugin, register that plugin with the phonegap plugin manager and then youll have access to all APIs (e.g. SMSManager) :-)

基本上,它的关键是您可以在插件内部编写原生 android(或其他平台)代码,使用 phonegap 插件管理器注册该插件,然后您就可以访问所有 API(例如 SMSManager):-)

回答by Dimitrios Mistriotis

For version 2.3, also check this: https://github.com/dimitrismistriotis/SendSmsCordovaPlugin, MIT liscnse. (Disclaimer: Written by me).

对于 2.3 版,还请查看:https: //github.com/dimitrismistriotis/SendSmsCordovaPlugin,MIT liscnse。(免责声明:由我撰写)。