简体   繁体   English

如何使用OpenTok连接两个不同的Android设备?

[英]How to connect two different Android devices using OpenTok?

I have gone through OpenTok Android Tutorial . 我已经看过《 OpenTok Android教程》 In this tutorial both, Publisher and Subscriber are the same user. 在本教程中,发布者和订阅者都是同一用户。 How can I subscribe another user to this Session? 我如何订阅其他用户的会话? In other words, How can I connect 2 different android devices? 换句话说,如何连接2个不同的android设备?

If you see OpenTokConfig.java file in the sample apps, you would notice a field 如果您在示例应用程序中看到OpenTokConfig.java文件,则会注意到一个字段

public static final boolean SUBSCRIBE_TO_SELF = true;

Set this property to false and then use the same token and sessionId in another android device to communicate. 将此属性设置为false,然后在另一个Android设备中使用相同的令牌和sessionId进行通信。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM