A-A+

网上转的通话时按键的代码

2017年07月01日 Android 暂无评论
//,是盲音等待时间,逗号越多,等待时间越长,就像10086,会有很长的语音提示,播完了,让你按什么键,逗号就是控制等待时间的。
phoneNumber = mConfAccount.getAccessNumber() + ",,,"
+ mConfAccount.getConfCode() + "#" + ",,," + "*" + ",,,"
+ mConfAccount.getModeratorPw() + "#" + ",,," + "1";

try {
//这个是核心代码,必须经过URLEncoder之后,才能自动输入。
phoneNumber = URLEncoder.encode(phoneNumber, "UTF-8");
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
//Util.BIZ_CONF_DEBUG(TAG, "catch error: " + e.getMessage());
e.printStackTrace();
}

//Util.BIZ_CONF_DEBUG(TAG, "dial number:" + phoneNumber);

Intent callIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:"
+ phoneNumber));

mActivity.startActivity(callIntent);
标签:

评论已关闭!