scope of onSessionDidRecieveStream?

Ask questions about the Android SDK here

scope of onSessionDidRecieveStream?

Postby modim1425 » Mon Jan 14, 2013 11:34 am

Good morning!

My question is this: does the Android method "onSessionDidReceiveStream" fire off whenever ANY publisher joins the particular OpenTok session (including js & ios publishers)?

Why?: my project has numerous participants queued up waiting to be interviewed by a single interviewer one-at-a-time . Implementing this with js was easy. I used signalling. Of course my dumb ass didn't bother to check that signalling was available in Android. You guys had steered me towards a 3rd party API as a remedy for such. Looking at these I've realized that I'm going to want to use Parse or Push at some future date anyway as they are much much more than simple signalling API's. Unfortunately, for this version of my project right now I'm under a severe time constraint(school, the genesis of all things meh) and am looking to find a way to weasel my way out of having to learn and deal with another API for the purposes of notifying a queued participant that they have been selected for interview. My thinking/hoping is that if the onSessionDidReceiveStream method works like it's js counterparts (getting triggered when ANY publisher joins the session, not just that device's own publisher), that when the interviewer clicks to connect to a participant I can simply have the interviewer's publisher disconnect, mark the database with a flag, reconnect (which triggers everyone's onSessionDidReceiveStream method), have all participants check the database to see if they've been flagged, and whoever has been flagged: connect. Viola!

At a glance does this seem do-able to you?
Was this post helpful? (0)
modim1425
 
Posts: 19
Joined: Tue Nov 20, 2012 5:18 pm
Thumbs Up: 1

Re: scope of onSessionDidRecieveStream?

Postby mumm » Mon Jan 14, 2013 11:43 am

Hi modim1425—Jon here,

The onSessionDidReceiveStream event should be called back anytime a new stream in the session is created—regardless if it comes from the calling device or not. While not ideal, as far as I can tell your suggested implementation sounds plausible.
Was this post helpful? (0)
mumm
 
Posts: 392
Joined: Wed May 18, 2011 12:10 am
Thumbs Up: 28


Return to Android



Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron