Package io.lastcrash.sdk
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addMaskRect
(String maskId, android.graphics.Rect maskRect) Mask and redact givenRect
and arbitrary maskId identifier stringstatic void
addMaskView
(android.view.View view) Mask givenView
static void
addMaskViewId
(int viewId) Start masking and redacting view with id during screen recordingstatic void
Track force termination eventstatic void
Call applicationInitialized() when application is fully initializedstatic void
SDK configurationstatic void
SDK configuration with option to work in debug modestatic void
Track custom eventstatic void
Track custom event with valuestatic void
pause()
Pause and stop LastCrash SDK screen recordingstatic void
Stop masking all rectsstatic void
Remove and stop masking all views during screen recordingstatic void
Remove and delete crashes instead of sending them to LastCrash This method should only be used in conjunction with implementingLastCrashReportSenderListener
static void
removeMaskRect
(String maskId) Stop masking rect with given maskIdstatic void
removeMaskView
(android.view.View view) Stop masking givenView
static void
removeMaskViewId
(int viewId) Stop masking view with id during screen recordingstatic void
Remove and stop masking all views with ids during screen recordingstatic void
Send crashes to LastCrash This method should only be used in conjunction with implementingLastCrashReportSenderListener
static void
Set crash report sender listener to control if and when crashes are reported to LastCrashstatic void
unpause()
Unpause and resume LastCrash SDK screen recording
-
Field Details
-
VERSION
LastCrash SDK Version- See Also:
-
-
Method Details
-
configure
SDK configuration- Parameters:
apiKey
- - LastCrash Project API Keyactivity
- - Application main activity
-
configure
SDK configuration with option to work in debug mode- Parameters:
apiKey
- - LastCrash Project API Keyactivity
- - Application main activityworkInDebugMode
- - true if SDK should work in debug mode
-
setCrashReportSenderListener
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 implementingLastCrashReportSenderListener
-
removeCrashes
public static void removeCrashes()Remove and delete crashes instead of sending them to LastCrash This method should only be used in conjunction with implementingLastCrashReportSenderListener
-
event
Track custom event with value- Parameters:
name
- - Event namevalue
- - Event value
-
event
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 givenView
- Parameters:
view
- - View to mask and redact during screen recording
-
removeMaskView
public static void removeMaskView(android.view.View view) Stop masking givenView
- 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
Mask and redact givenRect
and arbitrary maskId identifier string- Parameters:
maskId
- - Mask identifier stringmaskRect
- - Rect to mask and rect during screen recording
-
removeMaskRect
Stop masking rect with given maskId- Parameters:
maskId
- - Mask identifier to stop masking
-
removeAllMaskRects
public static void removeAllMaskRects()Stop masking all rects
-