October 2018
Intermediate to advanced
464 pages
15h 17m
English
First, we need to add the appropriate permission to make the call. Then, we need to add a button to call our Dial method. Start by opening the Android Manifest and follow these steps:
<uses-permission android:name="android.permission.CALL_PHONE"/>
<Button android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Dial" android:onClick="dialPhone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintRight_toRightOf="parent" app:layout_constraintTop_toTopOf="parent" />