Inheritance: Java.Lang.Object, Android.App.Application.IActivityLifecycleCallbacks
Beispiel #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);
        }
Beispiel #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;
     }
 }
 private static void AndroidEnvironment_UnhandledExceptionRaiser(object sender, RaiseThrowableEventArgs e)
 {
     if (e.Exception != null)
     {
         _client.Send(e.Exception, new List <string>()
         {
             "UnhandledException"
         });
         Pulse.SendRemainingActivity();
     }
 }
 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();
     }
 }
Beispiel #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();
            }
        }
 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();
     }
 }
 /// <summary>
 /// Detaches Raygun from automatically sending session and view events to Raygun Pulse.
 /// </summary>
 public static void DetachPulse()
 {
     Pulse.Detach();
 }
 /// <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);
 }
 /// <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);
 }
Beispiel #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;
       }
 }
Beispiel #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();
              }
        }