Android 通过彩信以编程方式发送图像(操作超时)

发布于 2024-12-27 19:08:58 字数 476 浏览 4 评论 0原文

我想在 Android 中以编程方式通过彩信发送图像。我正在关注以下链接:

http:// /androidbridge.blogspot.com/2011/03/how-to-send-mms-programmatically-in.html

如何在 Android 中通过彩信发送图像?

它有时有效,但大多数情况下有效我收到“java.net.SocketException:操作超时”。

任何人都可以提供有关此问题的更多信息吗?

I want to send an image via MMS programmatically in Android. I am following the links below:

http://androidbridge.blogspot.com/2011/03/how-to-send-mms-programmatically-in.html

How to send image via MMS in Android?

It works sometimes but mostly I get a "java.net.SocketException: The operation timed out".

Can any one provide more information regarding this problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

披肩女神 2025-01-03 19:08:58

听起来你真的超时了。您说它有时有效...您所在地区的 3G(或您正在使用的任何设备)数据网络是否存在接收问题?

如果您从同一位置上网并且页面没有加载刷新和超时,那么这可能就是您的问题。

尝试一下您知道接收效果好的地方。您可以通过捕获异常并在向用户弹出消息无法发送等消息之前重试消息发送几次来绕过此问题。更好的是保存未发送消息的历史记录,以便用户稍后可以重新发送它们。当然,我假设消息的发送是用户驱动的。如果没有,您可以不时(每隔几分钟)检查数据接收情况,然后在足够好的情况下重新发送,直到通过为止。

希望我有所帮助。

Sounds like you are really having a timeout. You say it sometimes works... Do you have a reception problem with your 3G (or whatever you are using) data network in your area?

If you are surfing the internet from the same location and pages don't load refresh and timeout, then that's probably your problem.

Try where you know the reception is good. You can bypass this problem by catching the exception and retry the sending of the message a few more times before popping a message to the user that the message could not be sent or the such. Better yet would be to save a history of unsent messages so that the user can resend them later. Of course I am assuming that the sending of the message is user driven. If not, you could check the data reception from time to time (every few minutes) and then resend when good enough until it goes through.

Hope that I helped.

夏九 2025-01-03 19:08:58

MMS 只是使用额外网络发送的 HTTP-POST 请求

you can download the source code here.
http://www.ziddu.com/download/14286605/SendMMS3.zip.html

I checked.Its work.

MMS is just a htttp-post request send using extra network

you can download the source code here.
http://www.ziddu.com/download/14286605/SendMMS3.zip.html

I checked.Its work.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文