Open GoogleCodeExporter opened 9 years ago
[deleted comment]
I have the same problem. I click a button and it opens the AppStore
application. I call the [[GAI sharedInstance] dispatch]; after the sendEvent in
applicationWillResignActive, applicationDidBecomeActive,
applicationWillTerminate.
Also tried:
1) - (void)applicationDidEnterBackground:(UIApplication *)application
{
UIApplication *app = [UIApplication sharedApplication];
bgTask = [app beginBackgroundTaskWithExpirationHandler:^{
[app endBackgroundTask:bgTask];
bgTask = UIBackgroundTaskInvalid;
}];
dispatch_sync(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[GAI sharedInstance] dispatch];
[app endBackgroundTask:bgTask];
bgTask = UIBackgroundTaskInvalid;
});
}
// Make the device to stay longer when the app is in background (but the
analytics didn't came)
2) After dispatching sent a delayed action to go to the AppStore
The current logic is
TrackEvent >> Dispatch >> Go to AppStore
Below is the code I use
id <GAITracker> tracker = [[GAI sharedInstance] defaultTracker];
[tracker sendEventWithCategory:@"..."
withAction:@"..."
withLabel:@"..."
withValue:nil];
[[GAI sharedInstance] dispatch];
[self performSelector:@selector(openAppStore) withObject:nil afterDelay:1];
Google should provide delegate methods and when the delegate has been notified
in a protocol method then perform the action to open another app.
Thank you,
Hoping this will resolve the new SDK
Original comment by christia...@gmail.com
on 20 Mar 2013 at 9:08
Original comment by pfrise...@google.com
on 10 Oct 2014 at 6:13
Original issue reported on code.google.com by
sma...@leftcoastbiometrics.com
on 14 Dec 2012 at 11:12