Hangs
The hang detector watches for situations where the main thread becomes unresponsive long enough to degrade the user experience, but the OS has not yet raised an ANR. When a hang is detected, Bugsee captures a stack trace of the main thread alongside the usual video / logs / network context and produces an issue report.
Internally, the detector schedules a 1 s tick on a background thread; each tick posts a ping to the main thread's Looper. If a ping isn't acknowledged within the configured threshold, a hang at the matching severity is reported.
Configuration
| Form | Setting |
|---|---|
| Manifest meta-data | <meta-data android:name="com.bugsee.option.detect.hang" android:value="true" /> |
Bugsee.launch() map | options.put(Options.DetectAndReportHang, true) |
| Default | false |
- AndroidManifest.xml
- Programmatic
<meta-data android:name="com.bugsee.option.detect.hang"
android:value="true" />
HashMap<String, Object> options = new HashMap<>();
options.put(Options.DetectAndReportHang, true);
Bugsee.launch(this, "<APP_TOKEN>", options);
Hang detection is disabled by default. Enable it on internal / pre-release builds first to tune the thresholds against your app's real-world main-thread behavior before rolling out to production.
Severity thresholds
Hangs are graded into three severity bands. Each band has its own configurable threshold (in milliseconds); a hang is reported at the highest band whose threshold has been crossed.
| Severity | Default threshold | Option constant | Manifest key |
|---|---|---|---|
| Fair | 3 000 ms | Options.DetectAndReportHangFairLevel | com.bugsee.option.detect.hang.level.fair |
| Medium | 5 000 ms | Options.DetectAndReportHangMediumLevel | com.bugsee.option.detect.hang.level.medium |
| Severe | 10 000 ms | Options.DetectAndReportHangSevereLevel | com.bugsee.option.detect.hang.level.severe |
The three thresholds must satisfy Fair < Medium < Severe and all three must be positive. An out-of-order trio reverts the entire set to defaults (the SDK doesn't try to repair partial overrides).
Reports are deduplicated per call-site hash, so a single stuck call site doesn't flood Bugsee with reports during a long-running hang.
See also
- Configuration → Detection — the option-key reference for all detection options including the hang thresholds.