I have an app where I’m sending an SMS message but it only seems to work when I’m home and using my wifi. When I’m out and using my provider’s network it doesn’t send: “Generic Failure”, BUT I can always send an SMS with my phone’s SMS (using the same exact number and format). What is the difference? Is there something I have to set in my app code or manifest?
Pretty standard stuff here:
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.
UPDATE:
I think it may have something to do with what I’m sending in he sms , because now my message is failing to send at home as well.I tried just send the text “test” and it worked, However I have a more complex message to send. Here is what I’m sending:
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
Anyone know why this would fail? The line dividers or could it be line breaks are allowed? Character limit? thx -Mike
SMS is limited to only 160 characters. If you need to send more, EMS (Enhanced Messaging Service) allow sup to 300, and MMS supports up to 1000 characters or your carriers data cap (normally 2.1mb).