Report from a notification
v1.8.0Make a screenshot report or start a screen recording from a notification.
Enable showReportNotification in your SDK initialization. It defaults to false and works independently of screenshot detection.
BugScreenSDK.start(
BugScreenConfig.Builder(this)
.apiKey("fb_your_api_key_here")
.showReportNotification()
.build()
)Show or hide it in code
The configuration sets initial visibility. Call showReportNotification() to show it even if the initial option was false or the tester dismissed it. Call hideReportNotification() to hide it until explicitly shown again.
Calls before initialization do nothing. Permission requests wait for a foreground app screen.
fun onShowReportNotificationSelected() {
BugScreenSDK.showReportNotification()
}
fun onHideReportNotificationSelected() {
BugScreenSDK.hideReportNotification()
}Allow notifications
Enabling the reporting notification or calling showReportNotification() requests POST_NOTIFICATIONS on Android 13 or later by default. Permission applies to all notifications from your app. Denial does not cause automatic retries or open Settings.
Set requestPermission = false on the builder or show call to request permission yourself. requestPermissionsOnStart applies only to screenshot detection.
BugScreenSDK.start(
BugScreenConfig.Builder(this)
.apiKey("fb_your_api_key_here")
.showReportNotification(show = true, requestPermission = false)
.build()
)
BugScreenSDK.showReportNotification(requestPermission = false)For apps targeting Android 12L or earlier, Android controls the prompt timing when the SDK creates its notification channel. If you opt out of SDK permission requests, arrange channel creation in your own permission flow.
What testers see
Android uses a silent dismissible notification with Report bug and Record screen actions. Android and the tester control its placement and ranking; it is not a heads-up alert or a foreground service.
The notification stays available while you open the notification shade over the app. It is removed when the app goes into the background and during recording preparation, capture and reporting.
Swiping away the notification keeps it hidden until your app calls showReportNotification() or initializes the SDK with the option enabled again.
Tapping the notification attempts to attach the current app window before opening the reporter. If capture fails or the window is protected, the reporter opens without a screenshot.
Video, camera, GL and separate app windows may be omitted. Review the attachment before submitting.
Start screen recording
Recording requires Android 10 (API 29) or later and a hardware H.264 encoder.
Choose your app when Android offers a capture scope. Full-display recording can include notifications and system UI.
- Choose Record screen from the notification. Return to the app and accept the system capture prompt when shown.
- Use the floating Stop recording control in the app to finish. It shows elapsed time and can be moved while you reproduce the bug.
- Preview or remove the video in the reporter before submitting. A recording report does not add a screenshot automatically.
The floating control appears even when initially off or previously hidden. Cancelling recording or closing the report restores its previous visibility.
Android shows its capture indicator and a recording notification with a Stop action.
Recordings use your floating-button quality settings and contain no audio. Capture stops at the shorter of the video-duration limit and 60 seconds.
Backgrounding or locking stops capture. Any available clip opens in a report when you return.
Floating button recording guide
Control the floating button in code
- Calling showFloatingButton() or hideFloatingButton(), or dismissing the control, overrides visibility restoration.
- Calling hideFloatingButton() during recording stops capture and opens the video report.
Try a report
- Open the app and select Allow when asked for notification permission. Open the notification shade and check that the reporting notification appears.
- Choose Report bug. Check the screenshot in the reporter and submit a test report.
- Choose Record screen, record a short interaction, then use Stop recording. Play the attached video and close the report. Check that the floating button returns to its previous visibility.
If it is missing, check app notification permission and the Bug reporting notification channel in Android settings. Return to the app after granting permission. If you dismissed it, call showReportNotification() again.