How can I call a number from button press in Android?

前端 未结 7 1311
轻奢々
轻奢々 2021-01-03 13:44

I\'m very much a beginner at this and I\'m struggling to get this to work.

When button is pressed, I simply want the dialer to open with the specified number automa

7条回答
  •  暖寄归人
    2021-01-03 14:11

    If you want the dialer to open with the number use ACTION_DIAL

    Intent i=new Intent(Intent.ACTION_DIAL,Uri.parse("tel:" + phoneno));  
    

    You do not need any permission

提交回复
热议问题