当使用按下确定按钮时,我在下面的代码中使用了呼叫选项。
它在模拟器上运行并转到调用选项,但是当我检查设备时,请注意。我的设备型号是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)
{
}
}
答案 0 :(得分:2)
试试这个 -
PhoneArguments callArgs = new PhoneArguments(PhoneArguments.ARG_CALL,numbers);
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, callArgs);