Data cleanup
Looking for the previous SDK? See the 6.x cleanup page.
Data cleanup
Bugsee stores unsent reports and buffered capture data on disk. The
deleteCollectedDataOnDevice(...) API wipes that store — useful after
sign-out, account deletion, or when responding to a user data request.
The SDK must be stopped before calling it. The callback reports whether the deletion succeeded.
- Java
- Kotlin
// Bugsee must be stopped before deleting the data.
Bugsee.stop();
// includingIntermediate=true also wipes partially-captured / in-progress data.
Bugsee.deleteCollectedDataOnDevice(true, success -> {
String msg = Boolean.TRUE.equals(success)
? "Data deleted successfully"
: "Failed to delete data";
Log.i("BugseeCleanup", msg);
});
// Bugsee must be stopped before deleting the data.
Bugsee.stop()
Bugsee.deleteCollectedDataOnDevice(/* includingIntermediate = */ true) { success ->
val msg = if (success == true) "Data deleted successfully" else "Failed to delete data"
Log.i("BugseeCleanup", msg)
}
deleteCollectedDataOnDevice(...) does not remove session-scoped data
such as user attributes.
Clear those explicitly:
Bugsee.clearAttribute("email");
Bugsee.clearAllAttributes();
Pausing capture without deleting
To stop capture temporarily without wiping anything on disk, bracket the
sensitive flow with
Bugsee.startBlackout() / endBlackout(). For a full shutdown
of the SDK rather than visual redaction, use Bugsee.stop() and relaunch with
Bugsee.launch(...) later.
Automatic retention
The on-disk report store is a cyclical buffer — older reports are evicted
automatically as new ones come in, so collected data does not grow
unbounded on the device. deleteCollectedDataOnDevice(...) is the only API
needed for an explicit wipe.