Android 短信编程
我是Android开发平台的新手。
第三方应用程序(比如我正在开发的应用程序)可以发送短信吗?
我相信我们无法访问默认的短信应用程序。因此,我计划自己开发一个,它将读取所使用的单词并在发送给接收者之前处理这些文本。我想知道是否有这样的API可以发送短信。
I'm a newbie on Android development platform.
Can a third party application (say the one I'm developing) send SMS messages?
I believe we do not have access to default text messaging app. Therefore I plan to develop one on my own, which will read words used and process such texts before delivering to receiver. I would like to know if there are such APIs which allow to send text messages.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
以下是一个可能有帮助的简单片段:
不要忘记添加
到 AndroidManifest.xml
测试:
您可以将短信从一个模拟器实例发送到另一个模拟器实例,为此,只需指定端口即可
作为目标的另一个实例的编号。
检查端口号:
Here is a simple snippet that might help:
Don't Forget to add
to AndroidManifest.xml
Testing :
You can send SMS from one instance of emulator to another ,to do that ,simply specify the port
number of the other instance as destination .
to check the port number :
http://thinkandroid.wordpress.com/2010/01/ 08/sending-sms-from-application/
我想这就是您正在寻找的。本文中描述的第二种方法不需要任何额外的权限,但它要求用户键入消息。我认为没有办法在未经许可的情况下发送短信。
http://thinkandroid.wordpress.com/2010/01/08/sending-sms-from-application/
I think this is what you are looking for. The second method described in the article does not need any additional permissions, but it requires that the user types the message. I don't think there is a way to send an SMS without the permission.
一个很好的起点是这里 http://developer.android.com/reference/ android/telephony/SmsManager.html
如果您想在应用程序中包含 SMS 功能,则需要使用 SmsManager 类。
A good place to start is here http://developer.android.com/reference/android/telephony/SmsManager.html
You need to use the SmsManager class, if you want to include SMS capability in your app.