要调用电话,只需点击一个按钮,我就可以直接调用电话。但我想改变这一点。
我想要的是,当我点击按钮时,我会像在 this image 中一样移动到 Composer 。
然后,我可以确认你不是来电电话。
拜托,你能帮帮我吗?这是我的实际代码
buttonCall.setOnClickListener(new View.OnClickListener()
{
public void onClick(View view){
Intent call = new Intent(Intent.ACTION_CALL);
call.setData(Uri.parse("tel:" 1234567));
startActivity(call);
}
});
最佳答案
使用 Intent.ACTION_DIAL
或 Intent.ACTION_VIEW
而不是 Intent.ACTION_CALL
。
来自 Intent :
ACTION_VIEW tel:123 -- Display the phone dialer with the given number filled in.
ACTION_DIAL tel:123 -- Display the phone dialer with the given number filled in.
关于android - 不直接打电话,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19654012/