Inheritance: Java.Lang.Object, Android.App.Application.IActivityLifecycleCallbacks
Esempio n. 1
0
        /// <summary>
        /// Causes Raygun to automatically send session and view events for Raygun Pulse.
        /// </summary>
        /// <param name="mainActivity">The main/entry activity of the Android app.</param>
        /// <returns>The RaygunClient to chain other methods.</returns>
        public RaygunClient AttachPulse(Activity mainActivity)
        {
            RaygunLogger.Debug("Enabling Real User Monitoring");

            Pulse.Attach(this, mainActivity);

            return(this);
        }
Esempio n. 2
0
 internal static void Detach()
 {
     if (_pulse != null && _mainActivity != null && _mainActivity.Application != null)
     {
         _mainActivity.Application.UnregisterActivityLifecycleCallbacks(_pulse);
         _mainActivity    = null;
         _currentActivity = null;
         _pulse           = null;
         _raygunClient    = null;
     }
 }
Esempio n. 3
0
 private static void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e)
 {
     if (e.Exception != null)
     {
         _client.Send(e.Exception, new List <string>()
         {
             "UnhandledException"
         });
         Pulse.SendRemainingActivity();
     }
 }
Esempio n. 4
0
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     if (e.ExceptionObject is Exception)
     {
         _client.Send((e.ExceptionObject as Exception), new List <string>()
         {
             "UnhandledException"
         });
         Pulse.SendRemainingActivity();
     }
 }
Esempio n. 5
0
        internal static void Attach(RaygunClient raygunClient, Activity mainActivity)
        {
            if (_pulse == null && raygunClient != null && mainActivity != null && mainActivity.Application != null)
            {
                _raygunClient = raygunClient;
                _mainActivity = mainActivity;
                _pulse        = new Pulse();
                _mainActivity.Application.RegisterActivityLifecycleCallbacks(_pulse);

                _raygunClient.SendPulseSessionEvent(RaygunPulseSessionEventType.SessionStart);
                _currentActivity = _mainActivity;
                _timer.Start();
            }
        }
Esempio n. 6
0
 private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     if (e.ExceptionObject is Exception)
     {
         _client.Send(e.ExceptionObject as Exception, new List <string>()
         {
             "UnhandledException"
         });
         if (_client.NativeClient != null)
         {
             WriteExceptionInformation(_client.NativeClient.NextReportUUID, e.ExceptionObject as Exception);
         }
         Pulse.SendRemainingViews();
     }
 }
Esempio n. 7
0
 /// <summary>
 /// Detaches Raygun from automatically sending session and view events to Raygun Pulse.
 /// </summary>
 public static void DetachPulse()
 {
     Pulse.Detach();
 }
Esempio n. 8
0
 /// <summary>
 /// Causes Raygun to automatically send session and view events for Raygun Pulse.
 /// </summary>
 /// <param name="mainActivity">The main/entry activity of the Android app.</param>
 /// <returns>The RaygunClient to chain other methods.</returns>
 public RaygunClient AttachPulse(Activity mainActivity)
 {
     Pulse.Attach(this, mainActivity);
     return(this);
 }
Esempio n. 9
0
 /// <summary>
 /// Causes Raygun to automatically send session and view events for Raygun Pulse.
 /// </summary>
 /// <returns>The RaygunClient to chain other methods.</returns>
 public RaygunClient AttachPulse()
 {
     Pulse.Attach(this);
     return(this);
 }
Esempio n. 10
0
 internal static void Detach()
 {
     if (_pulse != null && _mainActivity != null && _mainActivity.Application != null)
       {
     _mainActivity.Application.UnregisterActivityLifecycleCallbacks(_pulse);
     _mainActivity = null;
     _currentActivity = null;
     _pulse = null;
     _raygunClient = null;
       }
 }
Esempio n. 11
0
        internal static void Attach(RaygunClient raygunClient, Activity mainActivity)
        {
            if (_pulse == null && raygunClient != null && mainActivity != null && mainActivity.Application != null)
              {
            _raygunClient = raygunClient;
            _mainActivity = mainActivity;
            _pulse = new Pulse();
            _mainActivity.Application.RegisterActivityLifecycleCallbacks(_pulse);

            _raygunClient.SendPulseSessionEvent(RaygunPulseSessionEventType.SessionStart);
            _currentActivity = _mainActivity;
            _timer.Start();
              }
        }