Start a new topic

Implementing screen capture into Instant Tracking: Interactivity example


I am trying to implent the screen capture feature into the provided example, Instant Tracking: Interactivity. I am using Browsing POIs page from documentation as a reference. Specifically, I am using code provided under section Capture Screen Bonus (Browsing POIs documentation)I added the code below into index.html of 05_InstantTracking_3_Interactivity folder (button shows correctly). Only change i made is removing the line <a href="javascript: World.showRange();" data-icon="gear" data-inline="true" data-mini="true">Range</a> from <!-- header of UI holding feature buttons -->

<div id ="header-status" data-role="header" data-position="fixed" data-theme="c"> <a href="javascript: World.showRange();" data-icon="gear" data-inline="true" data-mini="true">Range</a> <a href="javascript: World.captureScreen()" data-icon="refresh" >Snapshot</a> <h1></h1> </div>

Also, I added the function below into 3dmodelsandgesturesinstanttracking.js of 05_InstantTracking_3_Interactivity folder. This function is taken from 10_BrowsingPois_6_Bonus-CaptureScreen at github.

captureScreen: function captureScreenFn() {
if (World.initialized) {
action: "capture_screen"

Alhtough the example app provided workes fine (10_BrowsingPois_6_Bonus-CaptureScreen), when I try to implement capture screen into Instant Tracking: Interactivity feature it does not ask for permissions neither prompts the share menu, thus not saving the photo. Seems like I am missing something, can you direct me through the process?

Thanks in advance,


Did you make sure to also handle the Android Native part of the functioanlity. Best would be to have a detailed look at the complete sample in regards to the capture screen feature together with the documentation and make sure that first the concepts are clear and then you change the code according to your needs.

Please also make sure that you handle the permissions accordingly - also compare the sample app and documentation in order to make sure to not forget anything.



Referring to documentation Browsing POIs at section Capture Screen Bonus, it states that by using those two parts of code referred above will do the trick, at least there is no additional steps described there. From what I can understand (I use the whole app example provided by github), the javascript code tells the urlListener to handle the picture sharing in native code. So what handling needs to be done for the Android Native part of the feature and where can I find the native code to perform the changes in need?



Login or Signup to post a comment