OnTargetLost with sample AR QR not working

0 votes
asked Apr 6, 2018 by ricardoblanco78 (120 points)
Hello I'm following the sample code for AR QR, it works fine for detect text from QR Code but when camera is not "watching" QR Code anymore event OnTargetLost or OnTargetUnload never executes.

Sample code each 2 seconds reads a flag that shows on screen text in QR code, I don't want to depend of time period, it would be better to know when QR code is not present for camera event based.

OnTargetLost when is executed?

Or Am I missing something?

Best Regards

Rick

1 Answer

0 votes
answered Apr 7, 2018 by albert52 (31,850 points)

That's normal.Target lost event. Will be triggered when target is lost in the scene.

commented Apr 9, 2018 by ricardoblanco78 (120 points)
Hello Albert,

Can you define target please? Talking about QR sample, QR code is a target? or isn't it?

Or maybe are you talking about image targets (that's another thing)?

When camera detects QR code TextMessage event fires (very good!!), and if I move QR code away from camera view I expect TargetLost event fires but it didn't (very bad).

How can I make TargetLost event fires when QR code is moved away from camera view? I didn't see other event to handle this behaviour :(
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...