Hi!
I know it is too much for u to read but if possible try to help me out!!
what i do it due to library path & header file issue i integrate my code in sample code i.e cloud recognition& in cloudrecoappdelegate.m i called my view of app
i got response for my image when i scan it but i am unable to complete the cycle of image recognition!
means once i scan the image & again go for same image it doesn't give response(not gng in scan mode)but if i scan diff image it shows response screen.
& i am going in scanning mode by doing this from my view Controller
CGRect screenBounds = [[UIScreen mainScreen] bounds];
window = [[UIWindow alloc] initWithFrame: screenBounds];
ARParentViewController *ARPVCObj = [[ARParentViewController alloc] initWithWindow:window];
[self.navigationController pushViewController:ARPVCObj animated:YES];
& what i do in EAGLView.mm file
-(void)infoRequestDidFinishForBook:(Book *)theBook withTrackableID:(const char*)trackable byCancelling:(BOOL)cancelled
{
if (theBook)
{
trackingTextureAvailable = NO;
[[ImagesManager sharedInstance] imageForBook:theBook
withDelegate:self];
}
else
{
PID=jsonFilename
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
[defaults setValue:PID forKey:DEFAULTS_RECEIVED_PID];
[defaults synchronize];
[NetworkHandler createNetworkRequestForProduct:@"LYKE"]; //this gives me my product response
// [[NSNotificationCenter defaultCenter] postNotificationName:@"kBookWebDetailDismissed" object:nil];
//[[NSNotificationCenter defaultCenter] postNotificationName:@"kStopLoading" object:nil userInfo:nil];
[QCARHelper stopDetection];
// [self dismissModalViewControllerAnimated:YES];
// ProductResponseViewController *prv=[[ProductResponseViewController alloc]initWithNibName:@"ProdctResponseViewController" bundle:nil];
// [self presentFramebuffer];
if (NO == cancelled)
{
// The trackable exists but it doesn't exist in our book database, so
// we'll mark that UniqueTargetId as a bad target
[[BooksManager sharedInstance] addBadTargetId:trackable];
}
// If theBook is nil, the loading UI would be shown forever and it
// won't scan again. Send a notification to revert that state
//[[NSNotificationCenter defaultCenter] postNotificationName:@"kStopLoading" object:nil userInfo:nil];
///[QCARHelper stopDetection];
}
}
also as i used tabbar so it gives folllowing error also
Unbalanced calls to begin/end appearance transitions for <MoreViewController: 0x6baba0>. error
following is the log in my app:-
2013-05-29 14:20:01.825 CloudReco[6802:907] * * ** * ** __managedObjectContext <NSManagedObjectContext: 0x6b46b0>
2013-05-29 14:20:08.785 CloudReco[6802:907] Unbalanced calls to begin/end appearance transitions for <MoreViewController: 0x6baba0>.
2013-05-29 14:20:09.868 CloudReco[6802:907] ARParentVC: creating
2013-05-29 14:20:09.958 CloudReco[6802:907] ARVC: loadView
2013-05-29 14:20:10.123 CloudReco[6802:907] QCAR OpenGL flag: 2
2013-05-29 14:20:10.129 CloudReco[6802:907] ARVC: viewDidLoad
2013-05-29 14:20:10.215 CloudReco[6802:907] QCARutils onCreate()
2013-05-29 14:20:10.221 CloudReco[6802:907] APPSTATUS_INIT_APP
2013-05-29 14:20:10.225 CloudReco[6802:907] APPSTATUS_INIT_QCAR
2013-05-29 14:20:10.232 CloudReco[6802:907] ARParentVC: loading
2013-05-29 14:20:10.242 CloudReco[6802:907] ARVC: Rotating to Portrait
2013-05-29 14:20:10.289 CloudReco[6802:907] ARParentVC: appearing
2013-05-29 14:20:10.296 CloudReco[6802:907] ARVC: Rotating to Portrait
2013-05-29 14:20:10.320 CloudReco[6802:907] ARVC: viewWillAppear
2013-05-29 14:20:10.340 CloudReco[6802:5603] INFO/AR(6802) 2013-05-29 14:20:10: QCAR SDK version 2.0.32
2013-05-29 14:20:10.334 CloudReco[6802:907] EAGLView: layoutSubviews
2013-05-29 14:20:10.382 CloudReco[6802:907] #DEBUG setRenderState 0 --> 0
2013-05-29 14:20:10.585 CloudReco[6802:907] APPSTATUS_INIT_TRACKER
2013-05-29 14:20:10.634 CloudReco[6802:907] Successfully initialized ImageTracker.
2013-05-29 14:20:10.638 CloudReco[6802:907] APPSTATUS_INIT_APP_AR
2013-05-29 14:20:10.643 CloudReco[6802:907] APPSTATUS_LOAD_TRACKER
2013-05-29 14:20:10.650 CloudReco[6802:7503] Initialize Visual Search in background thread
2013-05-29 14:20:10.736 CloudReco[6802:907] ARParentVC: appeared
2013-05-29 14:20:10.738 CloudReco[6802:907] ARVC: viewDidAppear
2013-05-29 14:20:10.740 CloudReco[6802:907] QCARutils onResume()
2013-05-29 14:20:11.486 CloudReco[6802:907] APPSTATUS_INITED
2013-05-29 14:20:11.598 CloudReco[6802:907] DEBUG/AR(6802) UIView has CAEAGLLayer class
2013-05-29 14:20:11.600 CloudReco[6802:907] DEBUG/AR(6802) UIView responds to selector renderFrameQCAR
2013-05-29 14:20:11.616 CloudReco[6802:907] Video background get data 960 720
2013-05-29 14:20:11.620 CloudReco[6802:907] APPSTATUS_CAMERA_RUNNING
2013-05-29 14:20:11.636 CloudReco[6802:907] Video background get data 960 720
2013-05-29 14:20:13.685 CloudReco[6802:907] *** -[AVCaptureVideoDataOutput setVideoSettings:] - videoSettings dictionary contains one or more unsupported (ignored) keys: (
Width,
AVVideoScalingModeKey,
Height
)
2013-05-29 14:20:16.092 CloudReco[6802:960f] INFO/AR(6802) 2013-05-29 14:20:16: Completed CloudReco transaction with ID 'd4137a4036674f039acba4a37e3952aa'
2013-05-29 14:20:16.388 CloudReco[6802:1613] INFO/AR(6802) 2013-05-29 14:20:16: ImageTracker: Successfully created dataset
2013-05-29 14:20:16.655 CloudReco[6802:1613] INFO/AR(6802) 2013-05-29 14:20:16: Successfully created ImageTarget.
2013-05-29 14:20:16.667 CloudReco[6802:1613] Successfully created new trackable 'Aashiqui2_1' with rating '3'.
2013-05-29 14:20:16.853 CloudReco[6802:7f07] metadataa={"cid": "5", "pid": "5", "version": "1.0.0"}
2013-05-29 14:20:16.857 CloudReco[6802:7f07] metadataa2=5
2013-05-29 14:20:17.039 CloudReco[6802:907] Server Response jsonString !: {"status":1,"title":"Aashiqui 2","brand":"Aashiqui 2","pictures":["http://cms.lykeback.com/Upload/ProductImages/400-x-300-aashiquei-5.jpg"],"cacheexpiry":"2013-05-29T23:59:59Z","touchpoints":[{"icon":"http://cms.lykeback.com/Upload/TouchPointIcons/arrow.png","text":"About Movie","url":"http://m.imdb.com/title/tt2203308/","action":"URL","actiondata":null},{"icon":"http://cms.lykeback.com/Upload/TouchPointIcons/blaze.png","text":"Watch videos","url":"http://m.youtube.com/#/results?search_query=Aashiqui+2+movie","action":"URL","actiondata":null},{"icon":"http://cms.lykeback.com/Upload/TouchPointIcons/Contact.png","text":"Visit Facebook page","url":"http://m.facebook.com/Aashiqui2","action":"URL","actiondata":null}]}
2013-05-29 14:20:17.129 CloudReco[6802:907] Date dateee: 20130529142017
2013-05-29 14:20:17.653 CloudReco[6802:907] ARParentVC: dissappeared
2013-05-29 14:20:17.656 CloudReco[6802:907] ARVC: viewDidDisappear
2013-05-29 14:20:17.658 CloudReco[6802:907] QCARutils onPause()
2013-05-29 14:20:17.659 CloudReco[6802:907] APPSTATUS_CAMERA_STOPPED
2013-05-29 14:20:18.071 CloudReco[6802:907] ARVC: viewDidDisappear
2013-05-29 14:20:21.874 CloudReco[6802:907] ARParentVC: appearing
2013-05-29 14:20:21.877 CloudReco[6802:907] ARVC: Rotating to Portrait
2013-05-29 14:20:21.879 CloudReco[6802:907] ARVC: viewWillAppear
2013-05-29 14:20:22.238 CloudReco[6802:907] ARParentVC: appeared
2013-05-29 14:20:22.241 CloudReco[6802:907] ARVC: viewDidAppear
2013-05-29 14:20:22.242 CloudReco[6802:907] QCARutils onResume()
2013-05-29 14:20:22.385 CloudReco[6802:907] APPSTATUS_CAMERA_RUNNING
2013-05-29 14:20:22.391 CloudReco[6802:907] DEBUG/AR(6802) UIView has CAEAGLLayer class
2013-05-29 14:20:22.392 CloudReco[6802:907] DEBUG/AR(6802) UIView responds to selector renderFrameQCAR
2013-05-29 14:20:22.403 CloudReco[6802:907] Video background get data 960 720
2013-05-29 14:20:24.809 CloudReco[6802:b90b] INFO/AR(6802) 2013-05-29 14:20:24: Completed CloudReco transaction with ID '2452fd77696a4633add3007d3c8ee0f7'
2013-05-29 14:20:25.962 CloudReco[6802:b83f] INFO/AR(6802) 2013-05-29 14:20:25: Completed CloudReco transaction with ID '6fc1407c843942d79a70bd148cab6674'
2013-05-29 14:20:37.220 CloudReco[6802:cbbf] INFO/AR(6802) 2013-05-29 14:20:37: Completed CloudReco transaction with ID '35c0cc61748341639eeb50a20ce51071'
2013-05-29 14:20:39.707 CloudReco[6802:be7b] INFO/AR(6802) 2013-05-29 14:20:39: Completed CloudReco transaction with ID 'a52486c570004c36b689988da23b07d8'
2013-05-29 14:20:42.734 CloudReco[6802:be03] INFO/AR(6802) 2013-05-29 14:20:42: Completed CloudReco transaction with ID '4e2b5446d6df481ca07d01b4e992ba16'
2013-05-29 14:20:47.712 CloudReco[6802:ba1f] INFO/AR(6802) 2013-05-29 14:20:47: Completed CloudReco transaction with ID 'd76b0caa9a984a41b82cce88820cddda'
2013-05-29 14:20:48.204 CloudReco[6802:907] ARParentVC: dissappeared
2013-05-29 14:20:48.208 CloudReco[6802:907] ARVC: viewDidDisappear
2013-05-29 14:20:48.212 CloudReco[6802:907] QCARutils onPause()
2013-05-29 14:20:48.217 CloudReco[6802:907] APPSTATUS_CAMERA_STOPPED
2013-05-29 14:20:48.541 CloudReco[6802:907] ARVC: viewDidDisappear
Hope you got my problem!
Not really.
I think you have made it very difficult for yourself by trying to change the sample without understanding the existing sample and thinking through the best approach. I appreciate this is not easy, so it can take some time.
If all you want to do is to display your own books then all you need is a server that can return the JSON as the Vuforia sample does:
{"title":"Cloud Recognition in Vuforia","author":"Karina Borland","average rating":"4","# of ratings":"41","list price":"43.99","your price":"43.15","targetid":"a47d2ea6b762459bb0aed1ae9dbbe405","thumburl":"https://developer.vuforia.com/samples/cloudreco/thumbs/01_thumbnail.png","bookurl":"https://developer.vuforia.com/samples/cloudreco/book1.php"}
...while modifying the JSON accordingly. Initially you probably don't need a sever as you may be able to change the code so that it returns the JSON locally without going to a server.
So my suggestion would be to start with the sample and see how you can modify it to get what you want. The other advantage here is that it will help you to understand the code piece by piece before you try something more ambitious.
HTH
N