I am working on Sample project (Video Playback) of Vuforia SDK, in which i added multiple xmls of marker and gave user choice to detect markers at his own wish whatever he choose, But problem i am facing is that it load only one xml and detect only that marker which loaded first time. It works perfectly fine when each marker detects uniquely in seperate project but when i merge these markers into one project then it only load first xml and detect first marker. I am doing for iOS. Following some code how i am loading xmls.
if(indexPath.row==0){ QCARutils *qUtils = [QCARutils getInstance]; // Provide a list of targets we're expecting - the first in the list is the default [qUtils addTargetName:@"Demo3D" atPath:@"Demo3D.xml"]; [self.view addSubview:arParentViewController.view]; } else if(indexPath.row==1){ QCARutils *qUtils = [QCARutils getInstance];// QCARutils *qUtils = [[QCARutils alloc] init]; // Provide a list of targets we're expecting - the first in the list is the default [qUtils addTargetName:@"Virtual Buttons" atPath:@"MyTestTrackable.xml"]; // Add the EAGLView and the overlay view to the window // Here we use a subclass of arParentViewController so it can add a subclass of OverlayViewController, with // functionality specific to this app [self.view addSubview:arParentViewControllerTouchInteraction.view]; } else if(indexPath.row==2){ QCARutils *qUtils = [QCARutils getInstance];// QCARutils *qUtils = [[QCARutils alloc] init]; // Provide a list of targets we're expecting - the first in the list is the default [qUtils addTargetName:@"Flakes Box" atPath:@"ImageMasking.xml"]; [self.view addSubview:arParentViewControllerImageMasking.view]; } if(indexPath.row==3){ appDelegate.touchedCategories = 3; QCARutils *qUtils = [QCARutils getInstance];// QCARutils *qUtils = [[QCARutils alloc] init]; // Provide a list of targets we're expecting - the first in the list is the default [qUtils addTargetName:@"Mat" atPath:@"MatTrackable.xml"]; [self.view addSubview:arParentViewController.view]; } if(indexPath.row==4){ appDelegate.touchedCategories = 4; QCARutils *qUtils = [QCARutils getInstance];// QCARutils *qUtils = [[QCARutils alloc] init]; // Provide a list of targets we're expecting - the first in the list is the default [qUtils addTargetName:@"SpinTrackable" atPath:@"SpinTracker.xml"]; [self.view addSubview:arParentViewController.view]; } Thanks. It will help me alot.
How to refresh marker xml in Single sample project of Qualcomm
Hi Aleem,
You need to use activateDataSet
to.... activate the data set
All you are doing above with addTargetName is adding it to the internal list.