AppDelegate.m 2.18 KB
Newer Older
Anthony Carno's avatar
Anthony Carno committed
1
2
3
4
5
6
7
8
9
10
//
//  AppDelegate.m
//  CaptuvoSDKDemo
//
//  Created by Anthony J. Carno on 2/9/15.
//  Copyright (c) 2015 Anthony J. Carno. All rights reserved.
//

#import "AppDelegate.h"

Alex Moore's avatar
Alex Moore committed
11
#import "CaptuvoViewController.h"
12

Anthony Carno's avatar
Anthony Carno committed
13
14
15
16
17
18
19
20
21
22
23
24
@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    return YES;
}

25
26
- (void)applicationWillResignActive:(UIApplication *)application
{
Anthony Carno's avatar
Anthony Carno committed
27
28
29
30
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

31
32
- (void)applicationDidEnterBackground:(UIApplication *)application
{
Anthony Carno's avatar
Anthony Carno committed
33
34
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
35
36
    [[Captuvo sharedCaptuvoDevice] stopDecoderHardware] ;
    [[Captuvo sharedCaptuvoDevice] stopPMHardware] ;
Anthony Carno's avatar
Anthony Carno committed
37
38
}

39
40
- (void)applicationWillEnterForeground:(UIApplication *)application
{
Anthony Carno's avatar
Anthony Carno committed
41
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
42
    [[Captuvo sharedCaptuvoDevice] startDecoderHardware] ;
43
    [[Captuvo sharedCaptuvoDevice] startPMHardware] ;
Anthony Carno's avatar
Anthony Carno committed
44
45
}

46
47
- (void)applicationDidBecomeActive:(UIApplication *)application
{
48

Anthony Carno's avatar
Anthony Carno committed
49
50
}

51
52
- (void)applicationWillTerminate:(UIApplication *)application
{
Anthony Carno's avatar
Anthony Carno committed
53
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
54
55
    [[Captuvo sharedCaptuvoDevice] stopDecoderHardware] ;
    [[Captuvo sharedCaptuvoDevice] stopPMHardware] ;
Anthony Carno's avatar
Anthony Carno committed
56
57
58
}

@end