我有一个应用程序,我正在发送短信,但它似乎只在我回家和使用我的无线网络时工作。当我出去使用我的提供商的网络时,它不发送:“通用故障”,但我总是可以用手机的短信发送短信(使用相同的确切数字和格式)。有什么不同?我的应用程序代码或清单中是否有必须设置的内容?
这里很标准的东西:
PendingIntent sentPI = PendingIntent.getBroadcast(this, 0,
new Intent(SENT), 0);
PendingIntent deliveredPI = PendingIntent.getBroadcast(this, 0,
new Intent(DELIVERED), 0)
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phoneNumber, null, message, sentPI, deliveredPI);
HERE IS THE LOGCAT: I see "gw_bit_error" but Not sure if thats anything...
D/QCRIL ( 1277): Saved WCDMA monitored set info
D/QCRIL ( 1277): qcril_event_main(): Waiting...
D/QCRIL ( 1277): Received srvsys event : CM_SS_EVENT_RSSI (73729)
D/QCRIL ( 1277): qcril_event_main(): 1 items on queue
D/QCRIL ( 1277): RIL <--- CM_SS_EVENT_RSSI (73729) --- AMSS
D/QCRIL ( 1277): LG_SYS: Accepted CM_SS_EVENT_RSSI, supported state.
D/QCRIL ( 1277): Serving System : srv status 2, sys mode 5, roam status 0, hdr_hybrid 0, hdr srv status 0, hdr roam status 0
D/QCRIL ( 1277): [Event CM_SS_EVENT_RSSI (73729)] Modem: On --> On, GW SIM: Ready --> Ready, CDMA SIM: Not ready --> Not ready, Mode Config: GW --> GW
D/QCRIL ( 1277): [Event CM_SS_EVENT_RSSI (73729)] Subscription: SIM --> SIM, Network: GW --> GW, Mode Preferred: GW --> GW
D/QCRIL ( 1277): [Event CM_SS_EVENT_RSSI (73729)] rs notification status 1, changed 0
D/QCRIL ( 1277): Finish processing event 1
D/QCRIL ( 1277): GW signal is available.
更新:
我认为这可能与我发送短信的内容有关,因为现在我的信息也无法在家发送。我试过发送文本“测试”并且它有效但是我有要发送的更复杂的消息。这是我发送的内容:
D/SmsManager(11128): text: You have received a message!
D/SmsManager(11128):
D/SmsManager(11128): groceries
D/SmsManager(11128):
D/SmsManager(11128): -------------------------------
D/SmsManager(11128): 1. pasta
D/SmsManager(11128): -------------------------------
D/SmsManager(11128): 2. cereal
D/SmsManager(11128): -------------------------------
D/SmsManager(11128): 3. bread
D/SmsManager(11128): -------------------------------
D/SmsManager(11128): 4. milk
任何人都知道为什么会失败?线路分隔线或是否可以换线?人物限制? thx -Mike
答案 0 :(得分:1)
短信仅限160个字符。如果您需要发送更多,EMS(增强型消息服务)允许支持300,MMS支持最多1000个字符或您的运营商数据上限(通常为2.1mb)。
答案 1 :(得分:0)
我认为问题是短信长度,限制可能是160,不确定但是如果短信很短,则信息会发送到任何地方(家或外)。