mvrx-mocking / com.airbnb.mvrx.mocking.printer / MavericksMockPrinter

MavericksMockPrinter

class MavericksMockPrinter : LifecycleObserver

This registers a Broadcast receiver on the MavericksView (only in debug mode) that listens for the intent action ACTION_COPY_MAVERICKS_STATE to copy mavericks state to files on device.

The resulting file names are printed to logcat so tooling can copy them from device.

Functions

onDestroyed

fun onDestroyed(): Unit

onStarted

fun onStarted(): Unit

onStopped

fun onStopped(): Unit

Companion Object Properties

ACTION_COPY_MAVERICKS_STATE

const val ACTION_COPY_MAVERICKS_STATE: String

Companion Object Functions

startReceiver

fun startReceiver(mvrxView: MavericksView): Unit

Register the given view to listen for broadcast receiver intents for mock state printing. This is safe to call multiple times for the same MavericksView, and is a no-op if MockableMavericks.enableMockPrinterBroadcastReceiver is disabled.