Skip to content

Commit 716ddfb

Browse files
romtsncodex
andcommitted
feat(samples): Add manual replay controls
Expose each manual Session Replay operation on the Android sample replay screen for interactive testing and demonstration. Refs JAVA-325 Co-Authored-By: Codex <noreply@openai.com>
1 parent 119ba0b commit 716ddfb

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

  • sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android

‎sentry-samples/sentry-samples-android/src/main/java/io/sentry/samples/android/MainActivity.kt‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,48 @@ fun SessionReplayScreen() {
580580
horizontalArrangement = Arrangement.spacedBy(12.dp),
581581
verticalArrangement = Arrangement.spacedBy(12.dp),
582582
) {
583+
item {
584+
SentryTraced("start_replay") {
585+
OutlinedButton(onClick = { Sentry.replay().start() }, modifier = Modifier) {
586+
Text("Start Replay", maxLines = 2, overflow = TextOverflow.Ellipsis)
587+
}
588+
}
589+
}
590+
item {
591+
SentryTraced("start_replay_buffering") {
592+
OutlinedButton(onClick = { Sentry.replay().startBuffering() }, modifier = Modifier) {
593+
Text("Start Replay Buffering", maxLines = 2, overflow = TextOverflow.Ellipsis)
594+
}
595+
}
596+
}
597+
item {
598+
SentryTraced("pause_replay") {
599+
OutlinedButton(onClick = { Sentry.replay().pause() }, modifier = Modifier) {
600+
Text("Pause Replay", maxLines = 2, overflow = TextOverflow.Ellipsis)
601+
}
602+
}
603+
}
604+
item {
605+
SentryTraced("resume_replay") {
606+
OutlinedButton(onClick = { Sentry.replay().resume() }, modifier = Modifier) {
607+
Text("Resume Replay", maxLines = 2, overflow = TextOverflow.Ellipsis)
608+
}
609+
}
610+
}
611+
item {
612+
SentryTraced("flush_replay") {
613+
OutlinedButton(onClick = { Sentry.replay().flush() }, modifier = Modifier) {
614+
Text("Flush Replay", maxLines = 2, overflow = TextOverflow.Ellipsis)
615+
}
616+
}
617+
}
618+
item {
619+
SentryTraced("stop_replay") {
620+
OutlinedButton(onClick = { Sentry.replay().stop() }, modifier = Modifier) {
621+
Text("Stop Replay", maxLines = 2, overflow = TextOverflow.Ellipsis)
622+
}
623+
}
624+
}
583625
item {
584626
SentryTraced("enable_replay_debug") {
585627
OutlinedButton(

0 commit comments

Comments
 (0)