Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/unity3d/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在android上使用smsmsmanager.sendTextManager发送短信时出现问题_Android_Unity3d_Android 4.2 Jelly Bean_Android 4.3 Jelly Bean - Fatal编程技术网

在android上使用smsmsmanager.sendTextManager发送短信时出现问题

在android上使用smsmsmanager.sendTextManager发送短信时出现问题,android,unity3d,android-4.2-jelly-bean,android-4.3-jelly-bean,Android,Unity3d,Android 4.2 Jelly Bean,Android 4.3 Jelly Bean,我正在从我的应用程序向使用5位数手机号码的服务器发送短信 在4.2.2操作系统上,它会在弹出窗口中询问我 已编辑 Q.如何处理取消/确定按钮 这应该可以 switch (getResultCode()) { // if cancel pressed then result code is 5 case 5: System.out.println("Message cancelled........"); break; // else

我正在从我的应用程序向使用5位数手机号码的服务器发送短信

在4.2.2操作系统上,它会在弹出窗口中询问我

已编辑

Q.如何处理取消/确定按钮

这应该可以

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;
    }

这是怎么回事??错误在哪里?我的问题是如何处理取消/确定按钮?