Start a new topic

ImageDrawable onClick could not be fired

ImageDrawable onClick could not be fired


Hi,

I have an issue with click event of ImageDrawable. I followed the example code of interactivity tutorial and tried some other ways but I couldnt have a solution to fire click event on Xamarin Wikitude SDK 4.1.2 version. I try it on Android Phone which has 5.0.2 Android version. Trackable2DObject's onClick event has been also tried and same without firing. Actually when button/image has been Clicked, I got those on Console;

updateKeyboardVisibility: type , flags , show , 

hideKeyboard

isActive: true

hideSoftInputFromWindow

 Below you could see main codes;

var linkPage = new AR.Trackable2DObject(this.tracker,'pageOne',{
            onEnterFieldOfVision: function(trackableIndex) {
                var btnImage = new AR.ImageResource("assets/buttons/button.png");
                var button = new AR.ImageDrawable(btnImage,0.4,{
                    offsetX : 0,
                    offsetY : 0.20,
                    onClick:function(){
                        AR.context.openInBrowser("http://www.wikitude.com/about/jobs-career",true);
                    }
                });
                linkPage.drawables.addCamDrawable(button);
            }
        });

Thank you for your support,
Emre

Hi Emre,
Can you confirm that our exmaple works? If the example does not work, did you update the jquery version that is included in the example Architect World?

Best regards

Andreas

Hi,

Unfortunately I can not confirm that example 1_ClientRecognition_3_Interactivity works. And I do not see any jquery file inside example or any info about that jquery file must be included inside index.html. But If you mean ade.js, no, I haven't touched it. Actually everything work  fine as 3DModel, video playing or an audio file playing but onClick.

Best regards,

Emre

Hi Emre,
Could you do me a favour and try the following Architect World?  You should see a circle in the north and if you click on it, an alert should be shown.

Note: This World requires the Geo feature.

Best regards

Andreas

Hi Andreas,
Thank you for your effort, unfortunately it still doesnt work, Create Circle button handles the click event and writes in Log "circle created" but it doesnt create circle or doesnt set on screen to check whether its own click event works. I have created the circle with my own index.html and can set on screen but click event has still problem.
Best regards,
Emre

Hi Emre,
Since the demo World uses geo ar you might need to calibrate your device compass. If you don't see the circle, then there are some issues with your project setup (missing 'NSLocationWhenInUseUsageDescription' key on iOS?!). What did you do differently to create the circle in your index.html? Have you tried it on iOS and Android?

Best regards

Andreas

 
Login or Signup to post a comment