List
Different trackable IDs and Names (CloudTrackable)
Posted Date: 2020-04-07 20:08     Edited Date: 2020-04-13 10:00     Writer: inactive

"Trackable Id" and "Trackable Name", which are passed in OnTrackSuccess don't match with Id and Name from "Get Target" request (WebAPI). The only property that matches - it's "ImgId". I tried to get it from CloudRecognitionController after deserializing of "recognitionResult", but it works only during the first scan of each target/marker. When rescanning the same marker, we no longer go to the place in the code where I can access CloudRecognitionData and get "ImgId" (Here is a video - https://drive.google.com/open?id=1imN_670--ujBVAIzCYjYCF3s0Oo5DOmz . Screenshot with the place where i get "ImgId" - https://imgur.com/fOG7fXe ).

1. SDK Version: 4.1.x
2. Development Environment: Unity-Android
3. Tracker/Scanner: CloudTrackable
4. License Type(Free / Pro-One Time Fee / Pro-Subscription / Enterprise): Pro-Subscription

Posted Date: 2020-04-08 7:24     Edited Date: 2020-04-08 7:24     Writer: sjkim

Thanks for your interest to our MAXST AR SDK.

 

First, I don't understand exactly how you are trying to solve the problem.

 

Since the "Trackable Id" and "Trackable Name" of the cloudTrackable.OnTrackSuccess () function do not match the Get Target in the WebAPI. 

Do you want to acquire a Trackable Id every time only the matching Trackable Id is recognized?

If not, is it correct to acquire Trackable Id "and" Trackable Name "when recognizing?

 

 

Best regards

Francisco

MAXST Support Team

Posted Date: 2020-04-08 13:47     Edited Date: 2020-04-08 14:24     Writer: inactive

I need to receive different content by trackable "Id". The problem is that the trackable “Id” in cloudTrackable.OnTrackSuccess () is somehow not the same as in the “Get Target” request (WebAPI). The only property in "Get Target" that matches is "ImgId". But, as I described above, it is problematic to get it, because the part of the code in which I can get it is not executed when re-scanning the same marker.

For example, the "Trackable Name" (trackable.GetName()) in cloudTrackable.OnTrackSuccess() - instead of the name "VideoSecondMarker" () I get "514624d2f4394bad9c9d0dd3e8e553dd" (name of 2dmap file). Same for "Trackable Id". Because of this, I'm trying to get the "ImgId" property from CloudRecognitionData. But here is another problem that I described above.

Maybe there is some solution how to get correct trackable "Id" (trackable.GetId()) in OnTrackSuccess().

Posted Date: 2020-04-10 5:12     Edited Date: 2020-04-10 9:52     Writer: inactive

The "Trackable Id" and "Trackable Name" of the cloudTrackable.OnTrackSuccess () function are not different from the id and Name of WebAPI.

Because, the "Trackable Id" and "Trackable Name" of the cloudTrackable.OnTrackSuccess () function output UTF-8 encoded values.

 

You can see to Trackable.cs script.

 

So, instead of encoding the return value, try outputting the value as string data.

 

If you have other question, feel free to continues question us.

 

 

Best regards

Francisco

MAXST Support Team

Posted Date: 2020-04-10 12:53     Edited Date: 2020-04-10 12:53     Writer: inactive

1) idBytes.ToString() -> System.Byte[]
2) BitConverter.ToString(idBytes) -> 33-38-43-34-45-32-33-41-30-42-39-46-39-42-33-31-39-38-41-38-46-39-33-39-30-35-43-38-30-39-34-41-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
3) Encoding.Default.GetString(idBytes) -> 38C4E23A0B9F9B3198A8F93905C8094A
4) Convert.ToBase64String(idBytes) -> MzhDNEUyM0EwQjlGOUIzMTk4QThGOTM5MDVDODA5NEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
5) Encoding.ASCII.GetString(idBytes) -> similar to UTF-8 and Default

Expected: 27863 (From "Get Target" request)

Posted Date: 2020-04-13 5:30     Edited Date: 2020-04-13 10:00     Writer: sjkim

Sorry for the confusion.

 

In Cloud Recognition, Id and Name are not returned by idBytes and nameBytes arrays,

However, Cloud Recognition returns ImgID and cloudNameBytes.

The ID is base64 in Cloud Recognition is ImgId.

Also, to check the Name, you can check it through Trackable.GetCloudName () function

 

If you have another question, feel free to continues question us.

 

 

Best regards

Francisco

MAXST Support Team