Class LastCrash

java.lang.Object
io.lastcrash.sdk.LastCrash
All Implemented Interfaces:
androidx.lifecycle.LifecycleObserver, io.lastcrash.sdk.ANRWatchDog.ANRInterceptor, io.lastcrash.sdk.ANRWatchDog.ANRListener

public class LastCrash extends Object implements androidx.lifecycle.LifecycleObserver, io.lastcrash.sdk.ANRWatchDog.ANRListener, io.lastcrash.sdk.ANRWatchDog.ANRInterceptor
LastCrash SDK
  • Field Details

  • Method Details

    • configure

      public static void configure(String apiKey, android.app.Activity activity)
      SDK configuration
      Parameters:
      apiKey - - LastCrash Project API Key
      activity - - Application main activity
    • configure

      public static void configure(String apiKey, android.app.Activity activity, boolean workInDebugMode)
      SDK configuration with option to work in debug mode
      Parameters:
      apiKey - - LastCrash Project API Key
      activity - - Application main activity
      workInDebugMode - - true if SDK should work in debug mode
    • setCrashReportSenderListener

      public static void setCrashReportSenderListener(LastCrashReportSenderListener listener)
      Set crash report sender listener to control if and when crashes are reported to LastCrash
      Parameters:
      listener - - Listener to handle crash
    • pause

      public static void pause()
      Pause and stop LastCrash SDK screen recording
    • unpause

      public static void unpause()
      Unpause and resume LastCrash SDK screen recording
    • sendCrashes

      public static void sendCrashes()
      Send crashes to LastCrash This method should only be used in conjunction with implementing LastCrashReportSenderListener
    • removeCrashes

      public static void removeCrashes()
      Remove and delete crashes instead of sending them to LastCrash This method should only be used in conjunction with implementing LastCrashReportSenderListener
    • event

      public static void event(String name, String value)
      Track custom event with value
      Parameters:
      name - - Event name
      value - - Event value
    • event

      public static void event(String name)
      Track custom event
      Parameters:
      name - - Event name
    • applicationInitialized

      public static void applicationInitialized()
      Call applicationInitialized() when application is fully initialized
    • applicationForceTermination

      public static void applicationForceTermination()
      Track force termination event
    • addMaskView

      public static void addMaskView(android.view.View view)
      Mask given View
      Parameters:
      view - - View to mask and redact during screen recording
    • removeMaskView

      public static void removeMaskView(android.view.View view)
      Stop masking given View
      Parameters:
      view - - View to stop masking during screen recording
    • removeAllMaskViews

      public static void removeAllMaskViews()
      Remove and stop masking all views during screen recording
    • addMaskViewId

      public static void addMaskViewId(int viewId)
      Start masking and redacting view with id during screen recording
      Parameters:
      viewId - - View id to mask
    • removeMaskViewId

      public static void removeMaskViewId(int viewId)
      Stop masking view with id during screen recording
      Parameters:
      viewId -
    • removeMaskViewIds

      public static void removeMaskViewIds()
      Remove and stop masking all views with ids during screen recording
    • addMaskRect

      public static void addMaskRect(String maskId, android.graphics.Rect maskRect)
      Mask and redact given Rect and arbitrary maskId identifier string
      Parameters:
      maskId - - Mask identifier string
      maskRect - - Rect to mask and rect during screen recording
    • removeMaskRect

      public static void removeMaskRect(String maskId)
      Stop masking rect with given maskId
      Parameters:
      maskId - - Mask identifier to stop masking
    • removeAllMaskRects

      public static void removeAllMaskRects()
      Stop masking all rects