0

I want to make video call directly but this code is not working. please halp me.

 val intent = Intent(Intent.ACTION_CALL).apply {
      data = Uri.parse("tel:" + "PHONE_NUMBER")
      putExtra("videocall", true)
    }
 startActivity(intent)
Anna
  • 13
  • 2

2 Answers2

0

Change Intent object to this

Intent("com.android.phone.videocall")

instead of Intent(Intent.ACTION_CALL)

0

Try this one

data = Uri.parse("tel:" + "PHONE_NUMBER")

val videoCall = Intent("com.android.phone.videocall")
videoCall.putExtra("videoCall", true)
videoCall.setData(data)
startActivity(videocall)

I hope it's working.

Bhavin Solanki
  • 418
  • 2
  • 10
  • Thank you for answering this question. But It is not working for me.. I try to change `videocall` to `videoCall`, but it's same error like this -> `No Activity found to handle Intent { act=com.android.phone.videoCall dat=tel:xxxxxxxxxxx (has extras) }` – Anna May 26 '22 at 07:46
  • Wrap it with try catch block.,it can help you something. – Bhavin Solanki May 26 '22 at 08:38