Log in or register to post comments

the camera background doesn't appear when I run app in the second time.

January 27, 2013 - 12:07am #1

I created the view before start FrameMarkerAppDelegate(scan AR View). After I push the UIBotton on view page, the FrameMarkerAppDelegate is started. The background is camera background after FrameMarkerAppDalegate run finished. Then I touch the camera background and choose go back view page, now we are on view page again. My problem is after I push the UIBotton again, The camera background doesn't appear. It still be view page but the camera is actived. Someone can help me. I try to solve this problem for 3 weeks, but I can't.

ViewController.mm

 

- (IBAction)btnSelect:(id)sender {

    FrameMarkersAppDelegate *appDelegate = [[FrameMarkersAppDelegate alloc] init];

    [appDelegate startFrameAppDelegate];

}

FrameMarkerAppDelegate.mm

 

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

{

    CGRect screenBounds = [[UIScreen mainScreen] bounds];

    window = [[UIWindow alloc] initWithFrame: screenBounds];

    [self setupSplashContinuation];

    [QCARutils getInstance].targetType = TYPE_FRAMEMARKERS;

    arParentViewController = [[ARParentViewController alloc] init];

    arParentViewController.arViewRect = screenBounds;

    [window insertSubview:arParentViewController.view atIndex:0];

    [window makeKeyAndVisible];

    return YES;

}

 

 

-(void)startFrameAppDelegate

{

    CGRect screenBounds = [[UIScreen mainScreen] bounds];

    window = [[UIWindow alloc] initWithFrame: screenBounds];

    [self setupSplashContinuation];

    [QCARutils getInstance].targetType = TYPE_FRAMEMARKERS;

    arParentViewController = [[ARParentViewController alloc] init];

    arParentViewController.arViewRect = screenBounds;

    [window insertSubview:arParentViewController.view atIndex:0];

    [window makeKeyAndVisible];

}

 

the camera background doesn't appear when I run app in the secon

January 29, 2013 - 3:27am #2

I am not quite sure what you are saying, but it seems as though the second time you run the application there is no video feed appearing from the camera?

The only thing I can think here is that Vuforia is not being shut down properly, possibly due to QCAR::deinit(); not being called.

Some developers have encountered problems starting and stopping Vuforia in this way.

 

If you are still having problems you can look at Danchoys sample code that shows how to integrate with Storyboards and try and adapt this for your own purposes, as he managed to find a way to start and stop Vuforia without any problems.

https://developer.vuforia.com/forum/ios/qcar-inside-uinavigationcontroller

 

HTH

N

Log in or register to post comments