Skip to content

PenumbraOS/app_process-mocks

Repository files navigation

Android Mocks for app_process

A custom Context implementation and other core features that allows for easy customization of common core Android classes. This allows experimenting with "app level" interactions while using app_process instead.

Usage

Set up your process by calling:

Common.initialize(classLoader)

This will set up your thread and initialize some core systems set up by ActivityThread during a normal app launch.

You can create a custom mocked Context using:

MockContext.createWithAppContext(classLoader, mainThread, "com.android.settings")

Installation

// settings.gradle.kts

dependencyResolutionManagement {
    repositories {
        maven {
            url = uri("https://jitpack.io")
        }
        ...
    }
}
// build.gradle.kts

dependencies {
    implementation("com.github.PenumbraOS:app_process-mocks:1.0.1")
}

About

Android mock core classes (like Context) for use in app_process

Resources

License

Stars

Watchers

Forks

Languages