Log in or register to post comments

Load target database from back-end

September 26, 2018 - 12:07pm #1

Hello everyone,

The answers I found seemed a bit outdated, so I would like to confirm something before spending time implementing Vuforia in my customer's solution.

Is it technically possible, with a standard license (non cloud) to update remotely the database of image targets by dowloading .dat and .xml files from our own back-end ? (after generating those files through vuforia's dashboard)

Many thanks for your help,

Kind regards,

Thibaut

Load target database from back-end

September 26, 2018 - 2:07pm #2

Hello thibautdu,

If you generate the database files (.dat and .xml) on the Vuforia Target Manager and upload them to your own server, you can download and activate them in your app at runtime just like any other asset. This can be done with a non-cloud license.

Here is a short code example of how you can load and activate a database once you downloaded it from your own server:

public void LoadAndActivateDataset(string loadThisDataset)
{
    TrackerManager trackerManager = (TrackerManager)TrackerManager.Instance;
    ObjectTracker objectTracker = TrackerManager.Instance.GetTracker<ObjectTracker>();

    //Stop the tracker.
    objectTracker.Stop();
   
    //Create a new dataset object.
    DataSet dataset = objectTracker.CreateDataSet();

    //Load and activate the dataset if it exists.
    if( DataSet.Exists( loadThisDataset ) )
    {
        dataset.Load( loadThisDataset );
        objectTracker.ActivateDataSet( dataset );
    }
 
    //Start the object tracker.
    objectTracker.Start();
}

Let me know if you have any additional questions.

Thanks,

Vuforia Engine Support

Log in or register to post comments