The screencap function doesn't fired. Is there anything wrong I made?
Thanks
A
Andreas Schacherbauer
said
about 10 years ago
Hi Frederick! I just did a quick test to see if there is anything wrong with your code. In my PhoneGap's index.js, I called the 'callJavaScript' function with a fake file filePath.
In my ARchitect World, I added a function which simply alerts a given string.
function showFilePath(filePath)
{
alert(filePath);
}
For me, everything was working, so it might be a problem with your absoluteFilePath variable? Did you alert this one as well? You can use Safaris Web Inspector to debug your PhoneGap & ARchitect Worlds javascript part. We have a short section about how to use Web Inspector in our documentation and you can also find more details in the web.
Best regards
Andreas
F
Frederick Chung
said
about 10 years ago
I alert the absoluteFilePath in the "onScreenCaptured" function, it is ok. Just it doesn't have any alert in the world.
Is there only way I can return back the file path of the screen capture with callJavascript? I want to return back the saved filepath back to the World, and display on the screen.
A
Andreas Schacherbauer
said
about 10 years ago
You can return the file path back into the ARchtiect World using the 'callJavaScript' function. There is simply either a typo or a similar problem which is aborthing the function call. Using Web Inspector and a little bit of debugging, you will be able to pass the value back into the ARchitect World.
Best regards
Andreas
F
Frederick Chung
said
about 10 years ago
I found out that, when I call the callJavaScript, there is an error in the log. "exec() call to unknown plugin: wikitudePlugin"
However, there is no problem when I call others such as hide and show.
In WititudePlugin.js, this line "cordova.exec(this.onWikitudeOK, this.onWikitudeError, "wikitudePlugin", "callJavascript", );" runs, but the result is going to "this.onWikitudeError" function.
I am using Phonegap (Cordova) 3.4, is it a problem when running with 3.4?
Frederick Chung