Skip to main content

Abnormal exits (7.x Beta)

7.x Beta

APIs and defaults may still change before the 7.0 stable release. Requires API 30+ (Android 11+); the detector is silently inert on older OS versions.

The exit detector surfaces process terminations that the user would otherwise never see — ANRs, low-memory kills, excessive-resource-usage kills, and other unexpected ends of the app process. It's powered by Android's ActivityManager.getHistoricalProcessExitReasons() API and aligns with the termination reasons reported on the Google Play Console Android vitals dashboard.

On the first launch each session, the detector queries the historical exit list on a background thread, deduplicates against the previously-processed timestamp, and maps each new record to one of the per-reason domains documented below. The matching ANR trace file is attached to ANR reports when present.

Configuration

The detector is layered: a master switch enables the provider, then per-reason sub-flags decide which termination reasons are actually reported. Sub-flags are only consulted when the master switch is on. The master defaults to true, and two sub-flags also default to true, so out of the box the detector already reports the most important cases (low-memory kills + ANR exits).

Master switch

FormSetting
Manifest meta-data<meta-data android:name="com.bugsee.option.detect.exit" android:value="false" />
Bugsee.launch() mapoptions.put(Options.DetectAndReportExit, false)
Defaulttrue

Opting in to additional exit reasons beyond the defaults:

<!-- Master is on by default — no need to declare it. -->
<meta-data android:name="com.bugsee.option.detect.exit.excessive_resource_usage"
android:value="true" />
<meta-data android:name="com.bugsee.option.detect.exit.user_requested"
android:value="true" />

Per-reason sub-flags

ReasonOptions constantManifest keyDefault
Low-memory killDetectAndReportExitLowMemorycom.bugsee.option.detect.exit.low_memorytrue
ANR / not respondingDetectAndReportExitNotRespondingcom.bugsee.option.detect.exit.not_respondingtrue
Excessive resource usageDetectAndReportExitExcessiveResourceUsagecom.bugsee.option.detect.exit.excessive_resource_usagefalse
Dependency diedDetectAndReportExitDependencyDiedcom.bugsee.option.detect.exit.dependency_diedfalse
User requestedDetectAndReportExitUserRequestedcom.bugsee.option.detect.exit.user_requestedfalse
User was stoppedDetectAndReportExitUserWasStoppedcom.bugsee.option.detect.exit.user_was_stoppedfalse
Permission changedDetectAndReportExitPermissionChangedcom.bugsee.option.detect.exit.permission_changedfalse
Package updatedDetectAndReportExitPackageUpdatedcom.bugsee.option.detect.exit.package_updatedfalse
Package state changedDetectAndReportExitPackageStateChangedcom.bugsee.option.detect.exit.package_state_changedfalse
OtherDetectAndReportExitOthercom.bugsee.option.detect.exit.otherfalse
UnknownDetectAndReportExitUnknowncom.bugsee.option.detect.exit.unknownfalse

The reasons map directly onto ApplicationExitInfo.getReason() codes — see the platform reference for the upstream documentation.

See also

Found an issue, typo, or wrong statement on this page? Report it now →