Let's follow the given steps to make a call using intents:
- Anko provides wrappers around the most common actions that can be done using intents; one of them is making calls. For this purpose, Anko provides the makeCall function, which takes in the phone number you want to call:
makeCall("+9195XXXXXXXX")
- The makeCall function returns true if the action was successful, or returns false if it wasn't. One thing to note is that you need to add the CALL_PHONE permission in your manifest file:
<uses-permission android:name="android.permission.CALL_PHONE"/>