# Making an audio call This guide shows you to how to make an audio call in your Android app. We assume you've already set up your Android app with the In-app Calling Android SDK. If you haven't already, [create an app](/docs/in-app-calling/getting-started/android/create-app) first. Or, if you want, move on to [handling incoming calls](/docs/in-app-calling/getting-started/android/receive-call). ## Setting up the UI Before you can make a call, you need to set up the app's UI. The UI part of the rest of the app's functionality (initiating and receiving an audio call) is handled inside another activity: `LoggedInActivity`. Start with defining this activity inside your `AndroidManifest.xml` file. *app/src/main/AndroidManifest.xml* ```xml ``` ## Initiating an audio call 1. Similarly as inside `LoginActivity`, create a basic layout containing an edit field for typing the callee username and a button that initates the call. *app/src/main/res/layout/main.xml* ```xml ... ... ``` 1. Inside SinchService's binder implementation add a method that uses call controller to initiate the call: *app/src/main/java/com/sinch/rtc/sample/push/SinchService.kt* ```kotlin fun callUser(userId: String): Call { val sinchClient = sinchClient ?: throw RuntimeException("Sinch Client is not created") return sinchClient.callController.callUser(userId, MediaConstraints(false)) } ``` 1. Bind the call button with the method and assign a `CallListener` to be notified about the changes of the call state: *app/src/main/java/com/sinch/rtc/sample/push/PlaceCallActivity.kt* ```kotlin override fun onCreate(savedInstanceState: Bundle?) { ... callButton.apply { isEnabled = false setOnClickListener(buttonClickListener) } } private fun callButtonClicked() { val userName = calleeNameEditText.text.toString() .. val call = sinchServiceInterface?.callUser(userName) .. startActivity(callScreen) } ``` ## Managing required permissions If you try to initiate an audio call by pressing the call button at this point the application would crash with the following error output: ```Shell Process: com.sinch.rtc.demovvsdk, PID: 876 com.sinch.android.rtc.MissingPermissionException: Requires permission: android.permission.RECORD_AUDIO ``` Although we already handled some of the permissions in an earlier step (Internet permissions), the difference here is that RECORD_AUDIO permission is an example of a runtime permission that must be handled during the user's interaction with the app. 1. Modify the Android Manifest file by decalring usage of the RECORD_AUDIO permission. *app/src/main/AndroidManifest.xml* ```xml ``` 1. Before the user logs in ask for the permission explicitly and start the client only if it was granted. *app/src/main/java/com/sinch/rtc/sameple/push/BaseActivity.kt* ```kotlin private val messenger = Messenger(object : Handler() { override fun handleMessage(msg: Message) { when (msg.what) { SinchService.MESSAGE_PERMISSIONS_NEEDED -> { val requiredPermission = msg.data.getString(SinchService.REQUIRED_PERMISSION) ActivityCompat.requestPermissions( this@BaseActivity, arrayOf( requiredPermission, Manifest.permission.POST_NOTIFICATIONS ), 0 ) } else -> {} } } }) override fun onRequestPermissionsResult( requestCode: Int, permissions: Array, grantResults: IntArray ) { ... sinchServiceInterface?.retryStartAfterPermissionGranted() } ``` Note: In depth overview of possible permission grant results and general handling workflow can be found on the offical Android documentation [website](https://developer.android.com/guide/topics/permissions/overview). ## Next steps Now that you've made a call, you can set up your application to handle incoming calls. Make a call