public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { #if DEBUG Localytics.SetLoggingEnabled(true); #endif // Localytics Auto Integrate Localytics.AutoIntegrate("xxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", launchOptions != null? launchOptions : new NSDictionary()); // Register for remote notifications if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var pushSettings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); } else { UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound; UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes); } this.SmokeTest(); // Code to start the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif return(true); }
override public void OnCreate() { base.OnCreate(); #if DEBUG Localytics.LoggingEnabled = true; #endif Localytics.AutoIntegrate(this); Localytics.SetLocationMonitoringEnabled(true); LocalyticsEvents.SubscribeToAll(); // Analytics callbacks LocalyticsEvents.OnLocalyticsDidTagEvent += LL_OnLocalyticsDidTagEvent; LocalyticsEvents.OnLocalyticsSessionWillOpen += LL_OnLocalyticsSessionWillOpen; LocalyticsEvents.OnLocalyticsSessionDidOpen += LL_OnLocalyticsSessionDidOpen; LocalyticsEvents.OnLocalyticsSessionWillClose += LL_OnLocalyticsSessionWillClose; // Messaging callbacks LocalyticsEvents.OnLocalyticsDidDismissInAppMessage += LL_OnLocalyticsDidDismissInAppMessage; LocalyticsEvents.OnLocalyticsDidDisplayInAppMessage += LL_OnLocalyticsDidDisplayInAppMessage; LocalyticsEvents.OnLocalyticsWillDismissInAppMessage += LL_OnLocalyticsWillDismissInAppMessage; LocalyticsEvents.OnLocalyticsWillDisplayInAppMessage += LL_OnLocalyticsWillDisplayInAppMessage; LocalyticsEvents.OnLocalyticsShouldShowPushNotification += LL_OnLocalyticsShouldShowPushNotification; LocalyticsEvents.OnLocalyticsWillShowPushNotification += LL_OnLocalyticsWillShowPushNotification; LocalyticsEvents.OnLocalyticsShouldShowPlacesPushNotification += LL_OnLocalyticsShouldShowPlacesPushNotification; LocalyticsEvents.OnLocalyticsWillShowPlacesPushNotification += LL_OnLocalyticsWillShowPlacesPushNotification; // Location callbacks LocalyticsEvents.OnLocalyticsDidUpdateLocation += LL_OnLocalyticsDidUpdateLocation; LocalyticsEvents.OnLocalyticsDidTriggerRegions += LL_OnLocalyticsDidTriggerRegions; LocalyticsEvents.OnLocalyticsDidUpdateMonitoredGeofences += LL_OnLocalyticsDidUpdateMonitoredGeofences; }
override public void OnCreate() { base.OnCreate(); #if DEBUG Localytics.LoggingEnabled = true; #endif Localytics.AutoIntegrate(this); }
override public void OnCreate() { base.OnCreate(); #if DEBUG var localytics = LocalyticsXamarin.Shared.LocalyticsSDK.SharedInstance; localytics.LoggingEnabled = true; #endif Localytics.AutoIntegrate(this); }
override public void OnCreate() { base.OnCreate(); localyticsXamarin = LocalyticsXamarin.Shared.LocalyticsSDK.SharedInstance; Localytics.SetOption("ll_app_key", "f737ce58a68aea90b4c79fc-0bc951b0-b42b-11e3-429f-00a426b17dd8"); #if DEBUG localyticsXamarin.LoggingEnabled = true; #endif Localytics.AutoIntegrate(this); Localytics.SetLocationMonitoringEnabled(true); //// Analytics callbacks LocalyticsSDK.LocalyticsDidTagEvent += LL_OnLocalyticsDidTagEvent; LocalyticsSDK.LocalyticsSessionWillOpen += LL_OnLocalyticsSessionWillOpen; LocalyticsSDK.LocalyticsSessionDidOpen += LL_OnLocalyticsSessionDidOpen; LocalyticsSDK.LocalyticsSessionWillClose += LL_OnLocalyticsSessionWillClose; //// Messaging callbacks LocalyticsSDK.InAppDidDismissEvent += LL_OnLocalyticsDidDismissInAppMessage; LocalyticsSDK.InAppDidDisplayEvent += LL_OnLocalyticsDidDisplayInAppMessage; LocalyticsSDK.InAppWillDismissEvent += LL_OnLocalyticsWillDismissInAppMessage; LocalyticsSDK.InAppWillDisplayDelegate += LL_OnLocalyticsWillDisplayInAppMessage; Localytics.ShouldShowPushNotification += LL_OnLocalyticsShouldShowPushNotification; LocalyticsSDK.PlacesShouldDisplayCampaignDelegate += LL_OnLocalyticsShouldShowPlacesPushNotification; Localytics.WillShowPushNotification += LL_OnLocalyticsWillShowPushNotification; Localytics.WillShowPlacesPushNotification += LL_OnLocalyticsWillShowPlacesPushNotification; //// Location callbacks LocalyticsSDK.LocalyticsDidUpdateLocation += LL_OnLocalyticsDidUpdateLocation; LocalyticsSDK.LocalyticsDidTriggerRegions += (sender, e) => { Console.WriteLine("XamarinEvent LocalyticsDidTriggerRegions " + e); }; LocalyticsSDK.LocalyticsDidUpdateMonitoredGeofences += LL_OnLocalyticsDidUpdateMonitoredGeofences; Localytics.ShouldPromptForLocationPermission += (arg) => { Console.WriteLine("XamarinEvent ShouldPromptForLocationPermission " + arg); return(true); }; Localytics.DeeplinkToSettings += (i, c) => { Console.WriteLine("XamarinEvent ShouldPromptForLocationPermission " + i + c); return(true); }; }
public override bool FinishedLaunching(UIApplication app, NSDictionary options) { analyticsListener = new LocalyticsAnalyticsListener_iOS(); messagingListener = new LocalyticsMessagingListener_iOS(); Localytics.SetAnalyticsDelegate(analyticsListener); Localytics.SetMessagingDelegate(messagingListener); #if DEBUG Localytics.SetLoggingEnabled(true); #endif // Localytics Auto Integrate Localytics.AutoIntegrate("YOUR_LOCALYTICS_APP_KEY", options != null? options : new NSDictionary()); // Register for remote notifications if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var pushSettings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); } else { UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound; UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes); } global::Xamarin.Forms.Forms.Init(); // Code for starting up the Xamarin Test Cloud Agent #if ENABLE_TEST_CLOUD Xamarin.Calabash.Start(); #endif LoadApplication(new App()); return(base.FinishedLaunching(app, options)); }