DevConsoleFacadeProvider

Functions

Link copied to clipboard
abstract fun accessInfo(): AccessInfo?

Session-code credentials for the running server, or null when it is not running.

Link copied to clipboard
abstract suspend fun captureScreenshot(): ScreenshotResult

Captures the foreground Activity's window and stores it as an attachment, then mirrors it onto the timeline. See ScreenshotResult for every way this can conclude, including ScreenshotResult.Disabled when DevConsoleConfig.screenshotPolicy is off -- which is the default, since a screenshot cannot be redacted.

Link copied to clipboard
abstract fun createInspectorIntent(context: Context): Intent?
Link copied to clipboard
abstract fun endpoint(): BrowserEndpoint?

The endpoint of the running server, or null when it is not running. DevConsoleState.Running carries no payload, so without this a host that loses its StartResult.Started -- to an activity recreation, say -- had no way to recover the address.

Link copied to clipboard

The current effective string value for a flag, reflecting any dashboard override. This is the accessor for multi-valued flags declared with io.devconsole.state.FeatureFlag.ofOptions (a boolean flag returns "true"/"false"). Falls back to "" for an unknown key.

Link copied to clipboard
abstract fun featureFlagValue(key: String): Boolean

The current effective value for a flag declared in DevConsoleConfig.featureFlags, reflecting any dashboard override. Falls back to false for an unknown key.

Link copied to clipboard
abstract fun initialize(application: Application, config: DevConsoleConfig): InitResult
Link copied to clipboard
abstract fun logRecorder(): LogRecorder

Feed host log lines in so they join the timeline alongside network calls and crashes.

Link copied to clipboard
abstract fun mockEngine(): MockEngine

Wrap in a DevConsoleMockInterceptor and add it to the host's own OkHttpClient.

Link copied to clipboard
abstract fun networkRecorder(): NetworkTransactionRecorder

Wrap in a DevConsoleOkHttpInterceptor and add it to the host's own OkHttpClient.

Link copied to clipboard
abstract fun openInspector(context: Context): InspectorOpenResult
Link copied to clipboard
abstract fun recordPush(input: PushInput): PushEvent

Called directly from the host's own push receiver. Never attempts provider delivery itself.

Link copied to clipboard
abstract fun registerStateProvider(provider: StateProvider): Boolean

Registers a state provider after initialize. Modular apps discover features lazily through DI, so requiring every state provider at construction time was not workable. Returns false if the runtime is disabled.

Link copied to clipboard
abstract fun socketRecorder(): SocketRecorder

Wrap in a DevConsoleOkHttpWebSocketListener when opening the host's own WebSocket.

Link copied to clipboard
abstract suspend fun startBrowser(request: StartRequest): StartResult
Link copied to clipboard
abstract fun state(): StateFlow<DevConsoleState>
Link copied to clipboard
abstract suspend fun stop(reason: StopReason)