Start a new topic

AR camera disable

AR camera disable


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:

app.wikitudePlugin.setOnUrlInvokeCallback(app.onURLInvoked);

 

Then in your ARchitect World simply call

document.location = 'architectsdk://action=closeWikitudePlugin';

 

If it's not working for you, use Safaris Web Inspector to get the JS error.

 


Best regards

Andreas


 

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. 

 

 

 

onClick: function() {

           document.location = 'architectsdk://action=circleTouched?color=' + circle.style.fillColor;

       }

 

i want to change the above code to this

 


onClick: function() {

           document.location = 'architectsdk://action=closeWikitudePlugin';

       }

 

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

 

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

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 . 

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.

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

Hi all,

       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
Login or Signup to post a comment