Log in or register to post comments

how to work with https://developer.vuforia.com/resources/dev-guide/open-web-site-and-display-toast-target-detection

March 18, 2013 - 4:39am #1

Hello all,

i am using https://developer.vuforia.com/resources/dev-guide/open-web-site-and-display-toast-target-detectionto open a url when the target image is detected, but it is not detecting same image twice in a row as we assign lastTrackableId = trackable.getId(); in imagetarget.cpp file, i want to open url on same image.

one other thing if i am not giving any condition(if block and directly calling disply) some times the web url is opening twice if i back and i didnt went oto camera screen.

Please help me.

how to work with https://developer.vuforia.com/resources/dev-gui

March 18, 2013 - 6:19am #5

Great.

how to work with https://developer.vuforia.com/resources/dev-gui

March 18, 2013 - 5:41am #4

Thanks its working for me.

how to work with https://developer.vuforia.com/resources/dev-gui

March 18, 2013 - 5:10am #3

Hi.

Now it is not giving me the detected image target name it is returning null. here is my code of cpp file of render frame method.

if (state.getNumTrackableResults() == 0)
    lastTrackableId = -1;
    for(int tIdx = 0; tIdx < state.getNumTrackableResults(); tIdx++)
    {
               const QCAR::TrackableResult* result = state.getTrackableResult(tIdx);
               const QCAR::Trackable& trackable = result->getTrackable();
              

             if (trackable.getId() != lastTrackableId)
             {
             js= env->NewStringUTF(trackable.getName());
             jclass javaClass = env->GetObjectClass(obj);
             jmethodID method = env->GetMethodID(javaClass, "displayMessage", "(Ljava/lang/String;)V");
             env->CallVoidMethod(obj, method, js);
             lastTrackableId = trackable.getId();
             }
     }
 

how to work with https://developer.vuforia.com/resources/dev-gui

March 18, 2013 - 4:53am #2

Hi, 

try adding this code in renderFrame() (in ImageTargets.cpp), right before entering the "for loop" that iterates over the trackabelResults:

if (state.getNumTrackableResults() == 0) lastTrackableId = -1;

 

Log in or register to post comments