How to open number dialer pad programmatically in android?

前端 未结 8 665
执笔经年
执笔经年 2021-02-07 04:10

I want to display Number Dial Keypad (Phone Call) Programmatically on button click in android. Code is available for direct number dialing but I only need to show the dial keypa

8条回答
  •  执念已碎
    2021-02-07 04:37

     public void openDialPad(String phoneNumber) {
            Intent intent = new Intent(Intent.ACTION_DIAL);
            intent.setData(Uri.parse(phoneNumber));
            startActivity(intent);
        }
    

提交回复
热议问题