Repository navigation
Conversation
This was referenced Dec 2, 2026
Contributor
|
@AatmanAJ is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub. |
Contributor
Author
|
@greptileai review |
3 similar comments
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
1 similar comment
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
4 similar comments
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
Contributor
Author
|
@greptileai review |
1 similar comment
Contributor
Author
|
@greptileai review |
…nto p06-finish2/analytics
…' into p06-finish2/live-updates
…gine' into p06-finish2/recording-engine
… p06-finish2/camera
…oid-recording-engine
…oid-recording-engine
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on the camera recorder PR (#4766), which sits on the earlier Android PRs. Only the top 14 commits are new here, from "ask for screen capture consent and start the recording service" onwards (
8f18eae3bto955a2354f), with a merge of the camera recorder PR (13954befa) before the last commit. Then come a second merge of the camera recorder PR (2d65c286c), four fixes after review (e250064a0toa27559d11), a third merge (a0d10de1b), a stronger notification tap test (0b815a319), a fourth merge (60943eb30), a fix for the recording notification on Android 10 (ea2f8ebb5), a fifth merge (b51abe660), a sixth merge (c2207a864), three fixes after review (b96705d9btobb59eebe8), a seventh merge (72c1d140d), an eighth merge, which brings in the sign-in fixes from #4734 (620bc309a), two fixes after review (e96dfabe6,55ab7547d), a ninth merge (1a5c466c6), a tenth merge (6240802b9), an eleventh merge (1706f0a8d), a fix after review (5d4081dc1), a twelfth merge (413c9409d), a test fix for a kept recording (02a6d4907), two more merges (cfd4dec6e,5356fb5ed), a merge of the display change stop test (dc09cfee9), two test fixes for finding Stop in the notification (25e7fe700,9d5f90bae), a merge that brings in the recording engine's drain deadline (0a1394f6a) and a fix that says how much of a recording was kept when saving stops (d5218bc1a). It brings in the review fixes from the earlier Android PRs, among them: sign-out clears notifications and stops playback, Cap images send the video access token, paging carries on after a refresh and shows its errors, the screen stays on while a Cap plays, an upload that storage asks to send later is retried, and lint no longer fails when a newer Kotlin is released. A last merge of the camera branch (3a7d32c4d) brings in the recording engine's fix that keeps the debug pattern recorder's footage when saving stops early (077ea1786, #4764). Once the PRs below merge this shows only its own diff.This PR adds screen recording to the Android app: the Screen mode of the recorder, a foreground service that records and uploads while you use other apps, and the notifications that go with it.
What is in it
The Android counterpart of the iOS broadcast extension and its app side (
CapBroadcast/SampleHandler.swift,Features/Record/ScreenRecording.swift). It all runs in one process: Android needs no separate extension, so the recording is written and uploaded by a foreground service using the recording engine and upload jobs from the engine PR.ScreenRecordingServicethen goes to the foreground with themediaProjectiontype (plusmicrophoneon Android 11 and later when the microphone is on) and only then takes theMediaProjection, as Android requires.Screenshots
The Screen mode on the API 37 emulator, recording through the app's upload path against a local fixture server. The ready panels and the two API 29 shots of the ready panel and the capture dialog were taken at
955a2354f, after the layout fix below; the rest at13954befa.The Android 16 capture dialog on API 37, which offers one app first:
API 29, light, where the dialog and the shade differ:
ffprobeon an 11 second recording uploaded on API 37: video H.264 Main, 854x1920, yuv420p, 11.11 s, 9.09 fps on average, as frames follow what changes on screen; audio AAC LC, 48 kHz mono, 96 kb/s. The full output is in ffprobe-pr12.txt.These recordings were stopped inside Cap, so the shade shows the upload notification rather than "Your recording is saved". The microphone track carried no real sound, as the emulators ran without audio.
Where it differs from iOS, on purpose
cap://record/stopstops the recording. On Android any installed app can open a link, so only Cap's own notification stops it and the link does nothing.Fixed after the device pass
RecorderTest.theScreenInstructionsEndAboveTheModePickerchecks that the last step ends above the picker. On API 29 it failed without the fix (the step ended at 604 dp, the picker started at 561 dp) and passes with it.Fixed after review
e250064a0).ScreenRecordingStopsTest.aRecordingBeingConcludedIsLeftAloneByResumeAllfails with the old order.bd5c28de7).ScreenRecordingStopsTest.aSavedProPlanLiftsTheLimitWhenThePlanCannotBeFetchedfails without the fallback.cap://record/stop. The Stop action now goes straight to the recording service, which is not exported, and tapping the notification stops the recording and opens Cap through an activity alias other apps cannot start. The link no longer stops anything (bbe039e2b). New in ScreenRecordingTest:theStopLinkFromAnotherAppDoesNotStopTheRecordingandtappingTheNotificationStopsTheRecordingAndOpensCap, which also checks that the notification opens the private alias (0b815a319). The Stop test now also waits for "Your recording is saved". With this fix's app changes reverted, all three fail on the API 37 emulator: the link stops the recording ("expected null, but was:"), the notification does not open the alias, and "Your recording is saved" never appears.a27559d11). The newScreenRecordingTest.signingOutDuringARecordingStopsItAndRemovesItsFileschecks that the recorder is idle, that the projection no longer appears indumpsys media_projectionand that no recording files are left. With the fix's app changes reverted it fails on the API 37 emulator, as the recording is still running after sign-out.ea2f8ebb5).ScreenRecordingTest.tappingTheNotificationStopsTheRecordingWhileOtherCapNotificationsShowposts three other Cap notifications first. On the API 29 emulator it fails without the fix and passes with it atea2f8ebb5.b96705d9b). The newScreenRecordingTest.signingOutFromCapDuringARecordingStopsItBeforeRemovingItsFilessigns out throughAppModel.signOut(), as the button does. On the API 37 emulator it fails without the fix, with the service still recording, and passes with it.0e264e7cb). Neither failure can be forced on the emulator, so these have no test.e96dfabe6). The service also stays until every failed start has been cleaned up, so that cleanup cannot stop it while a newer recording is still saving (55ab7547d). This failure cannot be forced on the emulator either, so it has no test.bb59eebe8). The newRecordingCoordinatorTest.aScreenRecordingWhoseUploadFinishesBeforeItIsListedShowsAsReadyfails without the fix.5d4081dc1).copyLinkput the link on the clipboard first and only then marked the recent item, so anything woken by the clipboard could still see the item unmarked. The item is now marked first.RecordingCoordinatorTest.aLinkIsMarkedAsCopiedBeforeItReachesTheClipboardchecks the item from inside the clipboard callback, so it fails on the old order every time and passes with the fix.d5218bc1a). The recording engine now gives up on an encoder that never finishes draining and completes with anUNFINISHEDfailure that carries the seconds it kept (feat(mobile-android): add the recording engine #4764). The screen recorder already kept the segments after a failure; its saved notification now reads "Couldn't finish saving, N s kept" in that case, whatever stopped the recording. An encoder that stops answering cannot be forced on the emulator, so this has no test of its own; the deadline is tested in the recording engine PR.Tests
:capkit:test: 269 tests, none new in this PR.:app:testDebugUnitTest: 510 tests on955a2354f, 15 of them new, and 513 after the review fixes: ScreenRecordingStopsTest (8): the first stop wins and later ones are ignored, for every stop path; the free plan stops at exactly five minutes on virtual time; an upgraded plan has no limit; stopping first cancels the limit; a recording under a second is discarded and its Cap deleted, and one of a second is kept, both against a loopback server; a recording whose job sign-out discarded is not kept; a recording whose Cap could not be created is discarded, not kept. RecordModelTest (4 new): choosing Screen closes the camera and recording asks for consent; the mode is locked while the screen is recorded and record stops it; the camera stays closed in Screen mode when the recorder comes back; the microphone chip follows the permission. RecordingCoordinatorTest (3 new): a screen recording is listed as one with its link copied; a too short one says so; a recording still capturing when its Cap cannot be created is stopped with the error before its files are removed.:media:testDebugUnitTest: 66 tests, 5 new in FramePacerTest, on virtual time: a still screen for 10 s gives a frame every half second and five 2 s segments; a busy screen at about 60 fps is thinned to 30 and then repeated every half second, still five segments; frames pass unthinned without a rate; the hold delay; the size fitting.Device pass
The suites ran once at
13954befa. Both emulators ran headless against a local fixture server.cap_cam_37)cap_cam_29)The 3 API 37 failures are the known Cap detail ones, listed separately because they are not in this PR's code:
CapDetailTest.playAndPauseandaShareLinkWithATimeOpensTheCapThere(Compose did not go idle while the emulator decoded the video) andaChosenSpeedIsKeptAfterTheAppIsOpenedAgain(touch input could not be injected). The skipped tests are all inCameraCaptureTest, which skips what the emulator's cameras cannot do: two cameras, a flip, or the frame rate it asks for. The crash buffers were empty after every suite.The layout fix's tests ran at
955a2354fon API 29: RecorderTest 5 of 5 and ScreenRecordingTest 2 of 2 passed. The review fixes' tests ran ata27559d11on API 37: RecorderTest and ScreenRecordingTest, 11 of 11 passed. ScreenRecordingTest passed 5 of 5 again at0b815a319on API 37. The Android 10 notification test passed atea2f8ebb5on API 29, and the new sign-out test atb96705d9bon API 37. With the drain deadline, ScreenRecordingTest passed 8 of 8 on API 35 at276cfebaa, the top of the Android stack.Checked
./gradlew spotlessCheck :capkit:test :app:testDebugUnitTest :app:lintDebug :app:assembleDebug :app:assembleRelease :app:assembleDebugAndroidTest :media:testDebugUnitTest :media:lintDebug :media:assembleDebugAndroidTestpasses ond45d93990, on the merge13954befa, on955a2354f, ona27559d11after the review fixes, with 269 capkit, 513 app and 66 media JVM tests, on the mergea0d10de1band on0b815a319, each with 270 capkit, 522 app and 66 media JVM tests, and on the merge60943eb30, onea2f8ebb5and on the mergeb51abe660, each with 272 capkit, 523 app and 66 media JVM tests, onbb59eebe8and the merge72c1d140d, each with 272 capkit, 524 app and 66 media JVM tests, on the merge620bc309a, one96dfabe6and on55ab7547d, each with 272 capkit, 531 app and 66 media JVM tests, and on the merges1a5c466c6,6240802b9and1706f0a8d, each with 273 capkit, 538 app and 66 media JVM tests, and on5d4081dc1with 273 capkit, 539 app and 66 media JVM tests. With the drain deadline, the check line passes at the top of the Android stack,276cfebaa, which containsd5218bc1a.Not checked
Confidence Score: 2/5

Do not merge yet: sharing choices still use the wrong organization, screen microphone controls still show the wrong source, and the unavailable-mode test still fails.
Findings
Fix with agent prompt
Summary
Adds Android screen recording with capture consent, a foreground service, recording notifications, audio capture, and upload support.
Reviews (27) · Last reviewed commit: "Merge branch 'fpscap/l15' into fpscap/l1..." · Reviewed by Greptile