Have imported the ZXingWidget project and it seems to be working as expected (after quite a bit of trail and error). What it can do now is to be activated, display a white framed view finder, scan a QRCode and return the result.
What I wish to add is to have ZXingWidget to turn the white view finder frame red when the scan result does not match any predefined strings.
My strategy is to update a global flag in my own project for the string matching result and have ZXingWidget read it.
My problem is, ZXingWidget cannot find the header file (where the global flag variable is declared) despite having set its header search path.
My feeling is, it is either because the search path is wrong or the strategy is flawed. Please advise.
Well, it kinda sounds like a hack, so if you’re not concerned about cleanliness, just extern it in the widget rather than bothering it to include a header.
At the point of defintion:
In the hacked widget:
The “proper” way to do it would be add an API for the widget, but that might not be worth the effort to you. (Polling that variable somehow would seem to be required: the widget draws the frame directly and won’t generally redraw it unless given a reason.)