0

使用点击确定按钮时,我已将以下代码用于调用选项。

它在模拟器上工作并转到调用选项,但是当我检查设备时没有发生。我的设备型号是 9800。

String[] buttons = { "CALL" ,"CANCEL" };
        Dialog dialog = new Dialog("Are you sure want to call "+number+" ?", buttons, null, 1, Bitmap.getPredefinedBitmap(Bitmap.INFORMATION));
        if (dialog.doModal() == 0) 
        {
            try 
            {
                String numbers = StringUtils.replaceAll(number, "-", "");
                Phone.initiateCall(Phone.getLineIds()[0],numbers);
            }
            catch (RadioException e) 
            {
            }           
        }
4

1 回答 1

2

试试这个 -

PhoneArguments callArgs = new PhoneArguments(PhoneArguments.ARG_CALL,numbers);
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, callArgs);
于 2012-09-06T05:26:44.553 回答