Comments (9)
@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.
"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.
@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.
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.
@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.
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.
@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.
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.
Thank you for taking the time to explain it further.
from mixedreality-qrcode-sample.
Related Issues (17)
- Prefab Missing Issue HOT 2
- Update to MRTK3 HOT 1
- The sample doesnt work with standalone remoting app with Hololens 2 HOT 12
- MRTK3 Sample HOT 1
- Not QR pops up HOT 7
- Scanning the two-dimensional code (qrCode.Data) of the Chinese content shows garbled characters
- Does not build to Windows IL2CPP
- I have met some problems about this project HOT 1
- QR-Codes are not recognized on digital displays
- Hello, I've encountered an issue at runtime where the editor isn't reporting any errors, but the recognition process isn't successful. Upon checking for errors, I found that QRCodeManager.isSupported() is returning false. This issue persists whether it's the Windows XR branch or the OpenXR branch. Additionally, during testing, the QR code prefab wasn't successfully added, and the script on the QR code didn't run as expected. I've checked settings like the Webcam, but haven't found any issues. Has anyone faced a similar problem, and if so, how was it resolved?
- Get a "COMException" error in standalone build HOT 1
- Unity .meta files missing in repo HOT 18
- Packages folder doesnt exists! HOT 3
- Crashes On Restarting The Tracking
- Cannot Build or Run due to missing references HOT 4
- Possible to get pose of QR code with Holographic Remoting? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mixedreality-qrcode-sample.