使用点击确定按钮时,我已将以下代码用于调用选项。
它在模拟器上工作并转到调用选项,但是当我检查设备时没有发生。我的设备型号是 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)
{
}
}