首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android彩信示例

Android彩信示例
EN

Stack Overflow用户
提问于 2011-07-23 14:32:21
回答 3查看 3.4K关注 0票数 1

我试着按照this answer的做法,通过代码发送彩信。

然而,当他开始谈论BroadCastReciversAndroid git,并且没有提供代码时,我停了下来。我真的对此感到迷惑。一开始很简单,但之后就变得很复杂了。

有人能解释答案中缺失的代码吗?如果有的话,可以提供它吗?

非常感谢

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-01-12 08:43:04

致那些可能感兴趣的人:

彩信功能在Android中有点不可靠,也没有很好的文档记录。因此,现有的解决方案并不总是有效的。你还不能依赖他们。

票数 2
EN

Stack Overflow用户

发布于 2017-01-13 17:51:09

为了在Android上发送彩信,您也可以选择使用商业彩信SDK,而不是使用内部堆栈。

Winwap here提供了一个简单的函数来发送和接收彩信消息,就像他们的文档中的send-example:

代码语言:javascript
复制
1. Initialize the API by calling the mmss_init function
2. Connect to the HTTP Proxy or WAP Gateway using the mmss_connect function
3. Create MMS message of type SEND_REQUEST_TYPE by calling mms_message_create function
4. Add MMS headers using mms_set_header_str, mms_set_header_encstr or mms_set_header_long functions. Mandatory headers TRANSACTION_ID, FROM and CONTENT_TYPE shall be set. Also at least one of the headers TO, CC or BCC shall be set. Other headers suitable for this type of message are optional
5. Add content to MMS Message by the help of mms_add_content function
6. Call the mmss_send_message function
7. Destroy MMS message using mms_message_destroy function
8. Disconnect from the HTTP Proxy or WAP Gateway using the mmss_disconnect function
9. Finalize the API by calling the mmss_fini function

缺点是,它是一个商业产品,不是免费的。

票数 1
EN

Stack Overflow用户

发布于 2011-07-23 15:35:58

我在这类问题上没有经验,但这可能会对你有所帮助:

代码语言:javascript
复制
Intent sendIntent = new Intent(Intent.ACTION_SEND);    
sendIntent.putExtra("sms_body", "some text");    
String url = "\\sdcard\\potrait.PNG";   
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));   
sendIntent.setType("image/png");    
startActivity(sendIntent);

这是来自here的副本。

This是另一个例子。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/6798730

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档