Search code examples
androidopentok

Publishing App Not Triggering OnSteamReceived Event


I have two Android devices running separate TokBox apps which are trying to communicate with each other through video chat. I am having a problem in getting the OnStreamReceived event from one of my application which is publishing the video chat. But the application that subscribes the video triggers the event. I need the event to be triggered on the publishing side. Can anybody let me know the reason? Thanks.


Solution

  • Tokbox QA staff here.

    Not sure what you mean with "separate Tokbox apps", but, if you use the same API Key for both ends, and you connect to the same session, the OnStreamReceived event would be received by the subscribers, not the publisher. This event will be triggered when another client publishes a stream, which means that the subscriber will not trigger the event. You can find further information here:

    https://tokbox.com/developer/guides/subscribe-stream/android/#detect_streams