为什么我会和QUOT;一般失败"而发送短信的错误? [英] Why do I get "Generic Failure" error while sending SMS?

查看:331
本文介绍了为什么我会和QUOT;一般失败"而发送短信的错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Android项目的工作,我需要发送的短信即可。我的应用程序收集所需的信息由消费Web服务并此信息的很短的和纯文本。:该信息随后以短信的形式发送。

I am working on android project where I need to send SMS. My app collects required information by consuming a web service and this information is very short and pure text. This information is then sent in the form of SMS.

我用的广播接收器将跟踪短信是否成功发送,并只需添加一个日志条目。我用的 SmsManager 发送短信即可。

I have used broadcast receiver that will keep track of whether SMS is sent successfully or not and simply add a log entry. I have used SmsManager to send SMS.

我的设备是有很好的WiFi强度和良好的GPRS网络。而发送短信,我发现,广播接收器插入日志条目,有的为成功,有的为通用失败。

My device is having very good WiFi strength and good GPRS network. While sending SMS, I have found that broadcast receiver inserts log entries, some for "Successful" and some for "Generic Failure".

为什么一些短信,因为通用失败失败?这背后有什么原因呢?

Why few SMS fail because of "Generic Failure"? What is the reason behind this?

我用Google搜索,发现有些人说要关闭WiFi。但对于消费Web服务我需要Wi-Fi开启。

I have googled and found that some people are saying to turn OFF WiFi. But for consuming web service I need WiFi ON.

任何人都可以给予一些见解?是否有此问题的任何解决方案?

Can anyone give some insight on this? Is there any solution for this problem?

推荐答案

如果您一起发送大量的短信会淹没你的手机,因此是preferable有一些延迟。

If you are sending a lot sms together it will flood your phone so it is preferable to have some delay.

接下来,如果你不耽误你必须看到,它不是在UI线程中完成的,否则你会得到ANR。

Next if you do delay you have to see to that it is not done in the UI thread or else you will get ANR.

尝试使用处理程序,我的朋友建议这一点,我想,它工作正常。

Try using handlers, my friend suggested this, I tried and it works fine.

对于通用的问题,我不知道..通用使得它听起来像它可能是一个正常的网络错误的名称。

As for Generic issue, I am not sure.. The name Generic makes it sound like it could be a normal network error.

希望这个信息是非常有用的。

Hope this information is useful.

这篇关于为什么我会和QUOT;一般失败"而发送短信的错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆