summaryrefslogtreecommitdiff
path: root/ios
diff options
context:
space:
mode:
authorBrad Leege <bleege@gmail.com>2015-04-07 15:53:17 -0500
committerBrad Leege <bleege@gmail.com>2015-04-07 15:53:17 -0500
commite86597011f83022fd534c7cac2afe058b386b4b2 (patch)
tree2d434224ece98ea9cc3f8535e12ab5f795890a9e /ios
parent482275f978007ec30d098889729e61ba2a095b32 (diff)
downloadqtlocation-mapboxgl-e86597011f83022fd534c7cac2afe058b386b4b2.tar.gz
#1216 - Added test usage of pausing / resuming Metrics to simulate app entering background mode and no other location manager running. Added paused state checking to pauseMetricsCollection and resumeMetricsCollection
Diffstat (limited to 'ios')
-rw-r--r--ios/app/MBXAppDelegate.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/ios/app/MBXAppDelegate.m b/ios/app/MBXAppDelegate.m
index f0541b9971..8c5947354a 100644
--- a/ios/app/MBXAppDelegate.m
+++ b/ios/app/MBXAppDelegate.m
@@ -1,5 +1,6 @@
#import "MBXAppDelegate.h"
#import "MBXViewController.h"
+#import <mbgl/ios/MGLMapboxEvents.h>
@implementation MBXAppDelegate
@@ -12,4 +13,15 @@
return YES;
}
+- (void)applicationWillEnterForeground:(UIApplication *)application
+{
+ [MGLMapboxEvents resumeMetricsCollection];
+}
+
+- (void)applicationDidEnterBackground:(UIApplication *)application
+{
+ [MGLMapboxEvents pauseMetricsCollection];
+}
+
+
@end