How to make video call programmatically on Android 2.2 or higher?
Asked Answered
Y

1

8

I am working on an application where I want to make a video call programmatically. I am using API level 8 for my application.

I have Samsung Galaxy S, where I can use video calling functionality. Using intent action ACTION_CALL, I can start voice call.

How to start video call? Which intent extra I have to provide? Is there any particular field which indicates that current outgoing call is video call? If yes, how can I set that field to indicate that I want to invoke a video call?

Yemane answered 19/8, 2011 at 12:34 Comment(1)
Hi All, I have searched different forums to solve my problem. I have found that Galaxy S allows us to place video call in a normal way. I have seen, whenever I place a voice call, value for "com.phone.extra.calltype" field will be set to "1" and for video call its value will be set to "2". This is the only difference that I have found. Is it possible to set "com.phone.extra.calltype" field to indicate new call is a video call? If yes, how can I set "com.phone.extra.calltype" extra field, while placing new call intent? Please help me. Any help will be grateful to me. Thanks to all.Yemane
E
3

Here is the code for creating video call on my Samsung Galaxy Tab (Android 2.2)

Intent callIntent = new Intent("com.android.phone.videocall");
callIntent.putExtra("videocall", true);
callIntent.setData(Uri.parse("tel:" + [your number goes here]));
activity.startActivity(callIntent);
Eventuate answered 29/8, 2011 at 14:20 Comment(5)
Hello Alekz, I am getting android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.phone.videocall dat=tel:xxxxxxxxxx (has extras) }. can you please help me. Thank you in Advance.Formate
@AmolSawant96Kuli Hi. That solution is device specific. Your exeption mean that your device does not have requested package/activity. The only thing I can advise is to make a video call from your actual device and to look through the logcat. Maybe you will be able to make some sort of reverse engeneering (that was what I did for my Galaxy Tab)Eventuate
@AmolSawant96Kuli Try adding intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);Kassandrakassaraba
How to set Time limit for the video callingOceanic
how directly make a vidoe call for google duo to particular phone no provided here callIntent.setData(Uri.parse("tel:" + [your number goes here])); with out display that apps main screen.Gradualism

© 2022 - 2024 — McMap. All rights reserved.