You are on page 1of 11

Phone call in a button

click and whatsapp chat


Android Studio
Create a new Android Project
Select an Empty Activity
Give a name to your project
Delete the TextView
Drag and drop a button and set the constraints
For the button, change the text and the id
Open MainActivity.java

• Create a button object


• Create an Intent and
pass ACTION_DIAL in the
buttons onClickListener
• Start the Activity
Output
Whatsapp Integration

• Add another button give a id and name of the button


• Declare two variable num for number and text for sending text

You might also like