How to take screenshot then make an htmldrawable occupy the entire screen

Rivera.migueld

Rivera.migueld

said
over 5 years ago

Hi Wikitude Forums. I have successfully put an html drawable with a sprite sheet animation on it, it works fine. The html shows when the target is recognized by the camera. However, what I want to is after recognizing the pattern, it must take a snapshot then the html animation must slowly start occupying the screen. I have knowledge in Java and I am just starting to learn JavaScript. Any help would be appreciated. If you need anything more, tell me, Thanks! :)

W

Wolfgang Damm

use the onEnterFieldOfVision trigger to get notified when the target appears. Since handling a screenshot is best done in the native (java, objective c) part of the app you need to signal to the native application. For this purpose use the ArchitectUrlListener and register it with the ArchitectView. Its urlWasInvoked method is then called everytime you set the document.location (in Javascript) to an url starting with "architectsdk://".

This process is explained in detail in the section Native Detail Page of the Browsing Pois Example.

Once the screenshot is done, just execute a javascript function that continues with the animation.