-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[andr][sdk] Screenshot taking capabilities (#122)
* Pass 1: Get rid of replayDependencies * Actually get rid of ReplayDependencies file and references * Pass 2: Restore internal replay diagnostic logging * Pass 3: Refactor ReplayPreviewClient * Pass 4: Flatten ReplayCaptureController * Fix DisplayManagers deps * Further simplify ReplayCaptureController * Undo unnecessary changes * fmt * fmt * Fix and refactor tests * fix main activity * Add class dependency plumbing for screenshot capturing flow * Hookup basic screenshot taking for Android U * Reduce jpeg compression quality to 0.1 (10) to match iOS * Cleanup and enrich collected metrics * Revert "Cleanup and enrich collected metrics" This reverts commit 66ec104. * Cleanup and enrich collected metrics * move the screenshot log call to rust * Simplify threading * better handling of error states * Fix calling the right rust method * Move logic to fun * First attempt at screenshots for API > 25 * Handle errors more gracefully * Re-organize code * Refactor time tracking * cleaning up threading * cleanup logging * Fix old tests * fixes * fmt * fmt * add polyform license to new files
- Loading branch information
Showing
32 changed files
with
650 additions
and
150 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
23 changes: 23 additions & 0 deletions
23
platform/jvm/replay/src/main/kotlin/io/bitdrift/capture/replay/IReplayLogger.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// capture-sdk - bitdrift's client SDK | ||
// Copyright Bitdrift, Inc. All rights reserved. | ||
// | ||
// Use of this source code is governed by a source available license that can be found in the | ||
// LICENSE file or at: | ||
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt | ||
|
||
package io.bitdrift.capture.replay | ||
|
||
import io.bitdrift.capture.replay.internal.FilteredCapture | ||
|
||
/** | ||
* Screen captures will be received through this interface | ||
*/ | ||
interface IReplayLogger : IInternalLogger { | ||
/** | ||
* Called when a screen capture is received | ||
* @param encodedScreen The encoded screen capture in binary format | ||
* @param screen The list of captured elements after filtering | ||
* @param metrics Metrics about the screen capture | ||
*/ | ||
fun onScreenCaptured(encodedScreen: ByteArray, screen: FilteredCapture, metrics: ReplayCaptureMetrics) | ||
} |
21 changes: 21 additions & 0 deletions
21
platform/jvm/replay/src/main/kotlin/io/bitdrift/capture/replay/IScreenshotLogger.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// capture-sdk - bitdrift's client SDK | ||
// Copyright Bitdrift, Inc. All rights reserved. | ||
// | ||
// Use of this source code is governed by a source available license that can be found in the | ||
// LICENSE file or at: | ||
// https://polyformproject.org/wp-content/uploads/2020/06/PolyForm-Shield-1.0.0.txt | ||
|
||
package io.bitdrift.capture.replay | ||
|
||
/** | ||
* Screenshots will be received through this interface | ||
*/ | ||
interface IScreenshotLogger : IInternalLogger { | ||
|
||
/** | ||
* Called when a screenshot is received | ||
* @param compressedScreen The compressed screenshot in binary format | ||
* @param metrics Metrics about the screenshot and compression process | ||
*/ | ||
fun onScreenshotCaptured(compressedScreen: ByteArray, metrics: ScreenshotCaptureMetrics) | ||
} |
Oops, something went wrong.