xamarinxamarin.ioswikitude

Wikitude Image recognized reset


So I have an app that uses Wikitude to recognize images. When an image is recognized I show a popup that gives the name of the image back. When the user clicks on done in the popup the image should be trackable again. But now everything works except for the image to be trackable again (unless i go off the image and go back on the image)

from the js file:

imageRcognized: function(name) {
        AR.platform.sendJSONObject(name);
    },

from C# delegate

public class PopUpdel : WTArchitectViewDelegate
{
    VC _presentingVC;

    public PopUpdel(VC presentingVC)
    {
        _presentingVC = presentingVC;
    }

    public override void ReceivedJSONObject(WTArchitectView architectView, NSDictionary jsonObject)
    {
        WikitudeScanResult result = new WikitudeScanResult()
        {
            name = jsonObject.ValueForKey(new NSString("name")).ToString()
        };
        _presentingVC.Tracked(result);
    }

    public void Tracked(WikitudeScanResult result)
    {
        //show popup 
    }

Now only thing that rest is reset the image so it can be scanned again


Solution

  • You could set ImageTracker.enabled to false when it is recognized and to true once you want to recognize it again.