发起视频通话 [英] Initiating Video Call
问题描述
我运行的GTalk对我的姜饼的Galaxy Tab P1000的最新版本(使用来自市场的通话安装程序)。
I am running the latest version of GTalk (using the Talk installer from the market) on my Gingerbread Galaxy Tab P1000.
我现在想以编程方式发起视频通话提供的相关联系在线和可用。
I now want to programatically initiate a video call provided that the related contact is online and available.
由于我没有发现我看着在相关的XML 并发现以下有趣的任何文件为:
As I didn't found any documentation for that I looked in the related XML and found the following interesting part:
<activity-alias android:icon="@drawable/ic_launcher_google_videochat" android:name="PublicCallIntentDispatcher" android:targetActivity="PublicIntentDispatcher">
<intent-filter>
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="vnd.android.cursor.item/video-chat-address" android:scheme="xmpp" />
</intent-filter>
</activity-alias>
由于这是一个发送至的动作,我不需要特别许可,是吧?我的问题是,我不知道怎么弄类型的 vnd.android.cursor.item /视频聊天地址的的项目。你有什么想法或暗示什么,我可能会尝试?
As it is a "Send-To" action, I don't need a special permission, do I? My problem is, that I don't know how to get an item of the type vnd.android.cursor.item/video-chat-address. Do you have any idea or hint what I might try?
在此先感谢!
推荐答案
编辑:
不得不做一些黑客拆卸左右,但我得到这个(其中,电子邮件是您需要的地址):
Had to do a bit of hacking around disassembling but I got this (where email is the address you want):
Uri imUri = new Uri.Builder().scheme("xmpp").authority("gtalk").query("call;type=video").appendPath(email).build();
Intent IM = new Intent(Intent.ACTION_SENDTO);
IM.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
IM.setData(imUri);
startActivity(IM);
这工作,但还是给出了是否要开始视频聊天,这不完全是我需要一个提示。希望这可以帮助其他人。
This works, but still gives a prompt on whether you want to start a video chat, which is not quite what I need. Hope this helps some other people.
这篇关于发起视频通话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!