Skip to content

Communication channel between Wikitude and React Native #10

@JanOwiesniak

Description

@JanOwiesniak

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions