GithubHelp home page GithubHelp logo

Comments (9)

cheles avatar cheles commented on June 24, 2024 4

@bb1121 one way of doing is to set a DateTimeOffset watcherStart = DateTimeOffset.Now in SetupQRTracking() and check for it in HandleEvents() in QRCodesVisualizer.cs with if (action.type == ActionData.Type.Added && action.qrCode.LastDetectedTime > QRCodesManager.Instance.watcherStart)

If qrCode is old, you can do a loop and remove it
foreach (var obj in qrCodesObjectsList) { Destroy(obj.Value); } qrCodesObjectsList.Clear();

This will clear the QR queue every time you start the app.

from mixedreality-qrcode-sample.

cheles avatar cheles commented on June 24, 2024 1

"The only way to fully flush the watcher appears to be restarting the system, which is not acceptable" this is by design as QR codes are kept at system level https://learn.microsoft.com/en-us/windows/mixed-reality/develop/advanced-concepts/qr-code-tracking-overview#are-qr-codes-saved-at-the-space-level-or-app-level

You should implement, in your app logic, a timestamp QR check. so you ignore all old scanned QR right at app start.

Now, regarding what @Morgan-6Freedom mentioned, on step 6, I don't remember seeing this. I will re-test and get back here with my findings. was it the main branch or OpenXR one?

Though, same advice applies to this, QR timestamp check at app startup.

from mixedreality-qrcode-sample.

cheles avatar cheles commented on June 24, 2024 1

@ARGs-code our sample is a QR code tracking proof-of-concept and not a ready-for-production application. we are working on updating our QR code tracking documentation https://learn.microsoft.com/en-us/windows/mixed-reality/develop/advanced-concepts/qr-code-tracking-overview#managing-qr-code-data with steps on how to check the timestamp.
it should fairly straight forward if you check for LastDetectedTime in QRCodeVisualizer.cs
https://learn.microsoft.com/en-us/windows/mixed-reality/develop/native/qr-code-tracking-cs-cpp#qr-code-tracking-api-reference

from mixedreality-qrcode-sample.

ARGs-code avatar ARGs-code commented on June 24, 2024 1

Yes, the code required to resolve this is very straight forward and once you explained the issue and we went through the entire documentation instead of skimming it, we were able to get it working as needed very easily. Thank you for clearly explaining that this behavior is intended and how to resolve it.

As a demo though, production ready or not, I still think this behavior is confusing.

from mixedreality-qrcode-sample.

cheles avatar cheles commented on June 24, 2024

@Morgan-6Freedom can you confirm which OS build you've repro this and whether it was Windows XR or OpenXR ?
also, does this happen with our latest QR code sample?

from mixedreality-qrcode-sample.

ARGs-code avatar ARGs-code commented on June 24, 2024

I am seeing this same issue in the QR Code Sample project as well. First encountered it when adapting this sample to my project and noticing that it keeps showing QR codes from previous sessions, instead of only showing QR Codes that have been seen in a given session. The Watcher does not appear to shut off properly, even when "StopQRTracking" is called. When the application loads, it immediately adds any previously seen QR Codes, even if the application has been shut down and restarted.

The only way to fully flush the watcher appears to be restarting the system, which is not acceptable.

Issue seen when using OpenXR, MRTK 2.8, Unity 2020.3.41f1 and building for HoloLens 2.

As a final note, which is the part that seems exceptionally odd- We noticed this issue in our own application first, as noted. So we went and built the sample project to see if we could recreate it. What we saw was very odd: Upon building the sample project, on first run, it added a QR Code that was observed in our custom app into the sample project despite no QR codes being present in the physical environment.

from mixedreality-qrcode-sample.

ARGs-code avatar ARGs-code commented on June 24, 2024

@cheles this logic should be implemented into the sample project then. Without it there is confusing behavior, which is exactly as @Morgan-6Freedom describes. Because the sample app does not do any checking for timestamps, the sample app shows QR codes from previous sessions, because they are automatically called via the QRCodeWatcher Added Event.

from mixedreality-qrcode-sample.

bb1121 avatar bb1121 commented on June 24, 2024

I am having the same issue. But I am pretty new to programing so I'm not to sure on how to fix it with the explanation that was given can anyone go into further detail on how to fix the issue?

from mixedreality-qrcode-sample.

bb1121 avatar bb1121 commented on June 24, 2024

Thank you for taking the time to explain it further.

from mixedreality-qrcode-sample.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.