Don't Be negative
Don't Be negative

Reputation: 1215

What are Status Codes for SMS

I followed this to Set/track Status Of a SMS

So in my SMS manager Activity I have added A Status

So Now I want to Know Default Status Codes for

1)SMS sent
2)Generic failure
3)No service
4)Null PDU
5)Radio off
6)SMS delivered and
7)SMS not delivered

I also followed this Regarding Codes of SMS.But I want to Set Status Codes for above all Seven

can any one suggest me on above seven

Upvotes: 2

Views: 765

Answers (2)

Fereshteh Naji
Fereshteh Naji

Reputation: 104

Do you mean this?

RESULT_ERROR_GENERIC_FAILURE

public static final int RESULT_ERROR_GENERIC_FAILURE

Generic failure cause

Constant Value: 1 (0x00000001)

3)RESULT_ERROR_NO_SERVICE

public static final int RESULT_ERROR_NO_SERVICE

Failed because service is currently unavailable

Constant Value: 4 (0x00000004)

4)RESULT_ERROR_NULL_PDU

public static final int RESULT_ERROR_NULL_PDU

Failed because no pdu provided

Constant Value: 3 (0x00000003)

5)RESULT_ERROR_RADIO_OFF

public static final int RESULT_ERROR_RADIO_OFF

Failed because radio was explicitly turned off

Constant Value: 2 (0x00000002)

but for items:1,6,7 I could not find anything even in Android developer document , I think you should use the result_Ok in broadcast receiver for sending SMS message and broadcast receiver for delivering SMS message,I hope I could help you.

Upvotes: 1

AskNilesh
AskNilesh

Reputation: 69724

You can use SmsManager class Constants

int     RESULT_ERROR_GENERIC_FAILURE    
        Generic failure cause
        Constant Value: 1 (0x00000001) 
------------------------------------------------

int     RESULT_ERROR_LIMIT_EXCEEDED    
        Failed because we reached the sending queue limit.
        Constant Value: 5 (0x00000005) 
------------------------------------------------

int     RESULT_ERROR_NO_SERVICE    
        Failed because service is currently unavailable
        Constant Value: 4 (0x00000004)              
------------------------------------------------

int     RESULT_ERROR_NULL_PDU    
        Failed because no pdu provided
        Constant Value: 3 (0x00000003) 
------------------------------------------------

int     RESULT_ERROR_RADIO_OFF    
        Failed because radio was explicitly turned off
        Constant Value: 2 (0x00000002) 
------------------------------------------------

int     RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED    
        Failed because the user has denied this app ever send premium short codes.
        Constant Value: 8 (0x00000008) 
------------------------------------------------

int     RESULT_ERROR_SHORT_CODE_NOT_ALLOWED    
        Failed because user denied the sending of this short code.
        Constant Value: 7 (0x00000007) 
------------------------------------------------

int     STATUS_ON_ICC_FREE    
        Free space (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).
        Constant Value: 0 (0x00000000) 
------------------------------------------------

int     STATUS_ON_ICC_READ    
        Received and read (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).
        Constant Value: 1 (0x00000001) 
------------------------------------------------

int     STATUS_ON_ICC_SENT    
        Stored and sent (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).
        Constant Value: 5 (0x00000005) 
------------------------------------------------

int     STATUS_ON_ICC_UNREAD    
        Received and unread (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27).
        Constant Value: 3 (0x00000003) 
------------------------------------------------

int     STATUS_ON_ICC_UNSENT    
        Stored and unsent (TS 51.011 10.5.3 / 3GPP2 C.S0023 3.4.27). 
        Constant Value: 7 (0x00000007) 
------------------------------------------------

Upvotes: 1

Related Questions