Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Communication channel between Wikitude and React Native #10

Open
JanOwiesniak opened this issue Nov 2, 2018 · 0 comments
Open

Communication channel between Wikitude and React Native #10

JanOwiesniak opened this issue Nov 2, 2018 · 0 comments

Comments

@JanOwiesniak
Copy link
Contributor

JanOwiesniak commented Nov 2, 2018

Setup

I have 2 screens, let us call them A and B.

Screen A is the Wikitude Screen started via Wikitude.startAR

github_01

Screen B has a semi transparent background and some UI elements (e.g. Buttons)

github_02

I don't want to touch the native wikitude views (iOS and Android), that's why i'm using react-native-navigation V2 to overlay Screen B via Navigation.showOverlay on top of Screen A.

github_03

Task

I want to change the UI on Screen A, depending on events which occur in the Wikitude Javascript SDK, running in the sceneUrl loaded via startAR into the iOS SDK (i know this sounds crazy).

Is it somehow possible to pass data from the Wikitude Screen back to a React Native Screen and vice versa?

Example Scene (loaded by WikitudeSDK)

Wikitude found a target

github_04

Wikitude lost the target

github_05


PS: This "overlay" approach seems to have other issues as well. Would it be possible to convert the Wikitude Screen into a "real" react component which can be used in other componets (e.g. View)? As far as i understand the code base, react-native-wikitude creates "just" a native iOS / Android View (which fires up the native iOS / Android Wikitute SDK, which loads the scene url). React doesn't even know what is going on because it's acts more or less in a fire and forget mentality (i guess this makes it even harder to create a bridge between those two worlds)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant