Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Android - Get context after realoding device#74

Open
wojteg1337 wants to merge 2 commits intomasterfrom
fix/get-context-on-reload
Open

Android - Get context after realoding device#74
wojteg1337 wants to merge 2 commits intomasterfrom
fix/get-context-on-reload

Conversation

@wojteg1337
Copy link
Contributor

fixes #68

Now we set proper context on reload, so we can see events.

🐛 🐛 🐛 Found bug that event listener isn't removed with OpenTok.removeListener()

Copy link
Contributor

@jukben jukben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! Could you please address the changes and rebase the repo, then let's merge it.

Session session = RNOpenTokSessionManager.getSessionManager().connectToSession(sessionId, token);
session.setSessionListener(RNOpenTokSessionManager.getSessionManager());
session.setSignalListener(RNOpenTokSessionManager.getSessionManager());
Log.d("blabla", String.valueOf(session));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this 🙏

}

public ReactApplicationContext getContext() {
Log.d("blabla", String.valueOf(this.mContext));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this.

}

public Session connectToSession(String sessionId, String token) {
// this.disconnectSession(sessionId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean the comments

const sessionId = 'YOUR_SESSION_ID';
const token = 'YOUR_TOKEN';

const sessionId =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably don't want to share your credentials

OpenTok.on(OpenTok.events.ON_SIGNAL_RECEIVED, e => console.log(e));
}

// async componentWillUnmount() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need this in the example?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Question] How publisher and subscriber components works?

2 participants