问题在使用smsManager.sendTextManager Android上发送短信发送短信、问题、sendTextManager、smsManager

由网友(Evildoer(妖孽))分享简介:我把从我的应用程序的短信到服务器,它使用5位数的手机号码。i am sending an sms from my app to server which uses 5 digit mobile number.4.2.2操作系统,它问我下面弹出on 4.2.2 os, it ask me below popup编辑...

我把从我的应用程序的短信到服务器,它使用5位数的手机号码。

i am sending an sms from my app to server which uses 5 digit mobile number.

4.2.2操作系统,它问我下面弹出

on 4.2.2 os, it ask me below popup

编辑

Q值。如何处理取消/ OK按钮?

Q. How to handle cancel/ok button?

推荐答案

这应该工作...

switch (getResultCode()) {
     // if cancel pressed then result code is 5
     case 5:
         System.out.println("Message cancelled........");
         break;
    // else if send pressed then result code will be one of these below cases
     case Activity.RESULT_OK:
         break;
     case SmsManager.RESULT_ERROR_GENERIC_FAILURE:
        break;
     case SmsManager.RESULT_ERROR_NO_SERVICE:
         break;
     case SmsManager.RESULT_ERROR_NULL_PDU:
        break;
     case SmsManager.RESULT_ERROR_RADIO_OFF:
        break;
    }
阅读全文

相关推荐

最新文章