Android Question SMS sending... GENERIC_FAILURE

cmweb

Active Member
Licensed User
Longtime User
Hi,

the question is not really related to Basic4Android.

I created an app that is sending SMS and it works great.

But on the Galaxy Note 2 (Android 4.1.2) of one of my users, the SMS Sent Status is always FALSE, with the ErrorMessage "GENERIC_FAILURE".

The user says that he can send SMS manually (with the standard SMS app) to the same phone numbers and that would work. The SMS would be sent.

But it always fails when using my app.

The app works fine on several other devices for several other users. And it also works well on my Galaxy Note 1 (Android 4.1.2). No problem.

So I'm wondering... what can be the reason for this GENERIC_FAILURE at this specific user?
And how can I get around this problem?

Best regards,

Carsten
 

bsnqt

Active Member
Licensed User
Longtime User
@cmweb: what method you are using to send SMS (PhoneSMS or reflector)?
Another question is: the user said your app can send but the Sent Status is always FALSE with error, however it still can send out the sms, or not at all (the receiver cannot receive it at all)?

Anyway, you can send the apk to me (or link), I have Galaxy Note 2 and can test for you.
 
Upvote 0

cmweb

Active Member
Licensed User
Longtime User
Hi bsnqt,

it's phoneSMS, and my app receives the GENERIC_FAILURE error. If the user uses the normal SMS app of his device, he can send SMS to the same phone numbers successfully.

But I guess I found the problem. The user is in France and he's using french words like août (= august) with special characters.
It seems that if you're using such special characters in the SMS text, the maximum SMS size is reduced from 160 characters to only 70. And the text size he wants to send is 140 characters. So I'm getting the failure.

I have now to figure out how to strip out all the special characters before sending...

Best regards,

Carsten
 
Upvote 0

bsnqt

Active Member
Licensed User
Longtime User
Ok, let us know if you can find out the prob. But I don't think much that special characters or encoding can be the problem, unless you have some special restriction in your application. Another thing is I believe 2-byte character set (encode) does give longer SMS or text length/size than 1-byte character text (not shorter length like you mentioned)
 
Last edited:
Upvote 0

atulindore

Member
Licensed User
Longtime User
I am having the same problem ..
I created one SMS app and using reflection lib to send SMS .. It is working fine with Android 4.1. but when same app is installed on Android 4.2. (MIUI) .. SMS sending not working.... When I tried to find out Error using sms sent status .. it is showing success as false and error is GENERIC_FAILURE ..
What could be the reason ... can any one suggest some solution ..
 
Upvote 0

Beja

Expert
Licensed User
Longtime User
with the ErrorMessage "GENERIC_FAILURE".

This error occurs when the phone number is either incorrect or it is not in the correct format. (Assuming you are using PhoneSMS)
check the source code and see if the format is ok with the locale of your user.. also tell user to check the phone number by
sending SMS message directly with the same format used in the App.
 
Upvote 0

atulindore

Member
Licensed User
Longtime User
@Erel : I am sending long SMS which is not supported by PhoneSMS lib .. But this Generic_Error is coming if I use PhoneSMS too while using app in android 4.2.2 .( MIUI) ..

Same code is working in all other android versions without any issue ...
 
Upvote 0

atulindore

Member
Licensed User
Longtime User
RESOLVED

I got problem identified.. posting in details .. may help others newbies ..

I am using dual sim phone where primary sim is being used for data and second sim is for call and sms.
Our B4A program uses primary sim for sending SMS where I had data balance and voice & sms balance was nil.
Primary Sim itself was not able to send SMS due to zero balance ..
This was the reason I was getting Error Message "GENERIC_FAILURE".
 
Upvote 0
Top