Topic has a solution and is locked
Log in or register to post comments

Trackable.getUserData() returns "false"

January 30, 2017 - 4:11pm #1
Topic solved

I have a cloud Target database. For some targets (not all), upon successfully recognized, the Trackable.getUserData() returns string of "false" instead of the metadata I uploaded for those particular targets. In the Vuforia portal, I have verified those metadata have been properly uploaded as I can download them and view. For all the other targets, the Trackable.getUserData() returns the properly associated metadata. 

This particular issue occurs to Android, iOS, and Web api for those image targets.

Has anybody ever experienced similar problem? If so, could you shed some lights on how to address this?

Thanks!

Trackable.getUserData() returns "false"

February 2, 2017 - 4:00pm #3

Thank you for the suggestion.

 

It turns out that we had duplicate image targets uploaded, with some images containing "false" as the metadata. Upon removing these duplicated images, the problem is solved.

Trackable.getUserData() returns "false"

January 31, 2017 - 3:27pm #2

You should verify that the target you expect is the same one you get returned. Add the following code to the OnNewSearchResult() method of CloudRecoEventHandler.cs:

//Check if the metadata isn't null
if (targetSearchResult.MetaData == null) {
    Debug.Log ("Target metadata not available.");
    return;
} else {
    Debug.Log ("MetaData: " + targetSearchResult.MetaData);
    Debug.Log ("TargetName: " + targetSearchResult.TargetName);
    Debug.Log ("Pointer: " + targetSearchResult.TargetSearchResultPtr);
    Debug.Log ("TargetSize: " + targetSearchResult.TargetSize);
    Debug.Log ("TrackingRating: " + targetSearchResult.TrackingRating);
    Debug.Log ("UniqueTargetId: " + targetSearchResult.UniqueTargetId);
}

Verify that the Target ID returned is same ID of target with the metadata in Target Manager.

Log in or register to post comments