简体   繁体   English

任何短信 API 可用于 android 从 android 应用程序发送短信?

[英]Any SMS API is available for android to send SMS from android Application?

In my application i want to send a SMS to user,they are registered to the application without the user interaction.在我的应用程序中,我想向用户发送短信,他们在没有用户交互的情况下注册到应用程序。 Is it possible in android? android可以吗? yes means how to do that because i don't want to open the default SMS application available in android. yes 表示如何操作,因为我不想打开 android 中可用的默认 SMS 应用程序。

Its very simple to send sms using android code-使用 android 代码发送短信非常简单-

SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(NUMBER, null, MESSAGE, null, null);

and if you want to capture all the events related to sms like sms sent,delivered then you can refer the link provided in above post by @Ian Newson.如果您想捕获与短信相关的所有事件,例如发送的短信,则可以参考@Ian Newson 在上面的帖子中提供的链接。 Thanks谢谢

Check the following link for details on how to send an SMS from an Android app查看以下链接,了解有关如何从 Android 应用程序发送短信的详细信息

http://mobiforge.com/developing/story/sms-messaging-android http://mobiforge.com/developing/story/sms-messaging-android

If you are just trying to send an SMS from the device it almost could not be more simple than using SmsManager.sendTextMessage如果您只是想从设备发送短信,那几乎没有比使用SmsManager.sendTextMessage更简单的了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM