Skip to content
This repository has been archived by the owner on May 29, 2020. It is now read-only.

ScreenCapture feature in controller ionicitude. #1

Closed
GeoffSeloana opened this issue Jul 7, 2016 · 11 comments
Closed

ScreenCapture feature in controller ionicitude. #1

GeoffSeloana opened this issue Jul 7, 2016 · 11 comments

Comments

@GeoffSeloana
Copy link

GeoffSeloana commented Jul 7, 2016

Greetings
I was trying to use the Screen Capture feature but i am battling. The screen Capture feature is also not working on the Demo App.
I see in the "capturescreen.js" file in the "6_BrowsingPois_6_Bonus-CaptureScreen" world that you are calling the captureScreen function you have created in the app.js file.

// The call to this Action is in www/wikitude-worlds/6_BrowsingPois_6_Bonus-CaptureScreen/js/capturescreen.js:283
function captureScreen() {
    Ionicitude.captureScreen(true, null)
      .then(function (absoluteFilePath) {
          console.log("snapshot stored at:\n" + absoluteFilePath);
      })
      .catch(function (error) {
          console.log(error);
      });
}

This function does not seem to work because when i press the button i still cannot see that console.log showing on the console.

@Tazaf
Copy link
Owner

Tazaf commented Jul 7, 2016

Hi !

Could you give more information (screenshots, error messages, if any) about the screenCapture not working in the Demo App ?
It was working during my tests.
Can you check if you have the latest Ionicitude version (^0.2.1-alpha) in the project (that should be the case, though).

@GeoffSeloana
Copy link
Author

GeoffSeloana commented Jul 7, 2016

But i just downloaded the app and followed the instructions. I ran the "ionic state restore" and it ran well and restored everything. Running the app all the functions are working besides this particular one.

@Tazaf
Copy link
Owner

Tazaf commented Jul 7, 2016

(You should have put your initial message's edit on a new message, I almost missed it 😉)

When you say that you don't see the log in your console, may I ask you of which console you're talking about ?
Since there are two WebViews when an AR World is active (one with the Ionic App - in background -, and a second with the actual AR World), there are also two consoles (one for each WebViews).
That particular log should appear in the console of the Ionic App WebView, since it is executed from this WebView. It should not appear in the console of the AR World WebView.

To be completely sure, you could also check your device's gallery to see if you can find your screenshot.

@GeoffSeloana
Copy link
Author

Sorry for not marking my previous message edited. I was referring to the one on the Ionic App, the one that should print out the path to the file.

@Tazaf
Copy link
Owner

Tazaf commented Jul 7, 2016

Ah... OK.

On which device (and OS) are you launching the app ? Is it an iPhone on iOS9 ?

(Also, did you found any screenshot in your phone's gallery ?)

@GeoffSeloana
Copy link
Author

GeoffSeloana commented Jul 8, 2016

I am launching it on a note 3, android 5.0. I do not find anything in the gallery.

@Tazaf
Copy link
Owner

Tazaf commented Jul 8, 2016

Hum.

It seems as if the document.location statement in the capturescreen.js is not correctly catched, as you implied...

I'd like to see if it's specific to the capture screen statement or if it's the same behavior for all document.location statement.

You can see here that there is a second document.location statement on the captureScreen AR World example.

To fire it, you need to click on a POI and then click on the "More" button. As a result, there should be a console.log line in the Ionic WebView console (see attached - taken from the Ionic WebView console)

image

Could you try this and tell me if anything appeared on your console ?

@GeoffSeloana
Copy link
Author

image
Nothing appears on the console. None of the buttons seems to recognize the clicks

@Tazaf
Copy link
Owner

Tazaf commented Jul 8, 2016

In your picture, you seem to be displaying the console for the AR World WebView. If it was the console for the Ionic App, there should be the same first lines of log as seen in my previous comment (unless you manually cleaned the console ?).

I see that you are using Chrome, so you should see something like that when navigating to chrome://inspect:

image

And the WebView you'd want to inspect is the one labelled index.html.

@GeoffSeloana
Copy link
Author

image
Screen capture error

@Tazaf
Copy link
Owner

Tazaf commented Jul 8, 2016

Okay.
I see where the problem is. It appears that the Demo App is in fact not using the latest version of Ionicitude (despite me thinking so).

Thanks (again) for pointing that out. I'll made the correction now, and push a new version of the App to close the issue.

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

No branches or pull requests

2 participants