I tried to control AR camera like trying to disable camera after image detected and loaded webpage . Once i done with the webpage i want to load the enable camera for detetion of images. How can i acheive this . Suggestions please . I am using phonegap plugin .
thank you
n
newbee @AR
said
over 9 years ago
Please suggest me, i am new to wikitude and i am new web technologies as well . So help me acheive a working demo.thank you
W
Wolfgang Damm
said
over 9 years ago
Hi,
I am not sure if I understand you correctly. If you want to display full screen content on top of the camera, the best way to do it is to use AR.context.openInBrowser which will open the webpage on top of the AR view and therefore automatically pauses the camera.
n
newbee @AR
said
over 9 years ago
Ok i explain better . I want to do image detection using AR . Once the image get recognitioned and 2d object appear on screen i made that 2d object clickable and triggered the event onclick . Up to this everything working fine for me . Now i want to close the AR world with in that OnClick event triggered earlier . I tried to close the world using wikitudePlugin.close() but its not working for me from that OnClick() function .
I want to use a Augmented Reality's image recognition as a authentication for a entry for my app . Once it done i want my app remain as a normal phonegap app which reders html pages with all functionalities .
I also tried after OnClick() directly opening window.open.href = some.html . it renders .html fine but it not running a js scripts included in .html pages .
Please help me .
A
Andreas Schacherbauer
said
over 9 years ago
Hi! Have you read the following article? It describes in detail how to close the Wikitude Plugin based on a certain event in an ARchitect World.
Best regards
Andreas
n
newbee @AR
said
over 9 years ago
Hi thanks for reply . I read and followed that article it was working fine when i create a button and attach closewikitudePlugin() function .But i don't want to create a button for Close the wikitudePlugin . But i want to close the wikitude plugin completely after clicked on 2d image which drawn on screen after image recognition.
But this is not working .It should work in any proper programming language . But i think some kind of conflict happening when i call this from onClick function or may be a bug .
It's not possible in a commercial app to create a button and ask user's to close a wikitudeplugin . Please help to fix this issue .
thanks
A
Andreas Schacherbauer
said
over 9 years ago
Hi document.location = 'architectsdk://action=closeWikitudePlugin'; will work inside the onClick function - I just tried it out myself. You simply need to code the functionality in your onURLInvoked function inside your PhoneGap context.
As the mentiond article expains, this is how your onURLInvoked function could look like:
onURLInvoked: function(url) {
if ( 'closeWikitudePlugin' == url.substring(22) ) {
app.wikitudePlugin.close();
} else {
alert('ARchitect => PhoneGap ' + url);
}
}
where the callback is set using the following line:
newbee @AR