Wikitude

How can we help you today?

isVisible() not detecting visibility on-screen

H

Hanna Raczek

started a topic
12 months ago

Hello everyone,

I'm currently trying to get isVisible to return the correct value, and to test it, I'm displaying the bool in a popup when the marker is selected on the screen. But isVisible() returns false, even though it's obviously on-screen (it has to be for it to be clicked!).

I've also attached the full files if you'd like to take a look--is there something I'm missing/misusing?the snippet directly above is unmoved from the original example, located in onMarkerSelected.

Essentially what I'm trying to make happen is, if you enter an actionArea and the marker is visible on-screen, a dialog drops down. I was thinking of alternatively having this happen all within OnEnterFieldOfVision, but I need to check if it's within the action area, as well, and I'm not sure how that could work within that function.

Wikitude Technical Support

said
12 months ago

Hello Hanna,

I must say I'm surprised that it did not work for you.

I ran the code at the time and ran it again now; successfully both times. I'd like you, if possible, to run the Wikitude sample app, try with the "Native Detail Screen" sample and report back to me whether that works or not.

It should be as simple as copying the two code snippets you provided to their respective locations in the sample.

Kind regards

Daniel

H

Hanna Raczek

said
12 months ago

Hello Daniel,

I replaced all of my files with those in the sample, and I added the callback functions to the markerObject. I then replaced marker.poiData.description with marker.markerObject.isVisible().toString() in the popup. I even set an alert popup with the same, and it's still returning false.

I'm not sure what to do from here. Could it be I need to update the SDK? The version I have is from early March, I believe. I'll try updating to the newest release to see if that has anything to do with it, but until then, I don't suppose you have any more ideas/tricks up your sleeve?

H

Hanna Raczek

said
12 months ago

I'm also unsure whether I'm replacing all of the files I'm supposed to to run the sample. It works, aside from isVisible(), but I've only been replacing the assets folder. Should I be replacing anything outside of that?

*Update*

I've just downloaded the latest SDK, but after replacing wikitudesdk.aar, I'm now getting a watermark that says "License Key Missing," even though I don't believe anything else has been changed, certainly not the license key--it hasn't been touched. I think I'll make a new topic for that, but this means I won't be able to test anything until that's fixed.

Wikitude Technical Support

said
12 months ago

Good morning Hanna,

which version of the SDK are you using exactly? I'd like to try it and check whether I can get the same results you are reporting.

I've also only tested using iOS up until now. I would not expect that to make a difference, as the relevant code is all C++ and therefore identical for both platforms, but I'll check just in case.

- Daniel

H

Hanna Raczek

said
12 months ago

Hi Daniel,

I believe it was 6.0.1, if I'm not mistaken.

Thank you for sticking with it and helping me, I really appreciate it.

Wikitude Technical Support

said
12 months ago

Hello again,

using the workaround of supplying the empty callbacks worked on Android as well; using version 6.1.0 (slightly advanced state, but the changes should be unrelated and save me from switching all the branches locally).

Just to be sure, I'd like you to run the world I attached to this post and see what happens.

Wikitude Technical Support

I just tried 6.0.1 on Android, same result for me. Now I'm excited to see what happens when you run the sample I sent.

I wouldn't expect it to make a difference, but are you using the JavaScript SDK directly or one of the extensions?

- Daniel

H

Hanna Raczek

said
12 months ago

Hi Daniel,

Same result, as in, same result that I had? If so, then oh, excellent, I'm not going crazy! :'D I am using the JavaScript SDK, yes. And I will definitely run your sample when I get 6.1.0 up and running! I've actually found that the AR view runs fine with 6.0.1's wikitudesdk.aar, but it's when I replace it with that of the newer version's that the overlay appears.

I'll report back once that's sorted out and I get to run it.

Wikitude Technical Support

said
11 months ago

Hi Hanna,

I meant same result as in "the result I have been getting consistently". It worked for me in every case we've been going over.

Sorry about the ambiguous phrasing. :)

Kind regards

Daniel

H

Hanna Raczek

said
11 months ago

Hi Daniel,

Darn it! Okay, I will be running your sample today and let you know what happens!

H

Hanna Raczek

said
11 months ago

Hello again!

It appears it is now working. Don't know why, don't know how, maybe I changed a minor tidbit without knowing it which did something--who knows. BUT the important thing is that it is working, and I can't thank you enough for sticking with me. Your help was SO appreciated. Thanks so much!!