Package 

Class PostHogNativeCrashIntegration

  • All Implemented Interfaces:
    com.posthog.PostHogIntegration

    
    public final class PostHogNativeCrashIntegration
     implements PostHogIntegration
                        

    Captures native (NDK) crashes from previous runs of the app.

    A native signal (e.g. SIGSEGV) kills the process before any JVM handler runs, so nothing can be captured in-process. Instead, on startup this integration reads the crash records the OS kept via android.app.ActivityManager.getHistoricalProcessExitReasons, parses the attached tombstone, and captures an $exception event with raw native stack frames and the $debug_images needed for server-side symbolication against uploaded .so debug symbols.

    Requires Android 12 (API 31), where native crash records carry a tombstone. Enable with errorTrackingConfig.captureNativeCrashes; error tracking autocapture must also be enabled in the project settings.