This is a Flipper plugin for Android ANR (Application Not Responding) detection. It requires Android target SDK version 30
or above. With this plugin, you can get more detailed ANR information within Flipper, simplifying the debugging process.
To integrate the ANR-Detection plugin into your Android application, follow these steps:
- Add the JitPack repository to your project's
build.gradle
:
maven { url = uri("https://jitpack.io") }
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
- Add the ANR-Detection plugin as a dependency in your app's
build.gradle
:
dependencies {
debugImplementation("com.github.allen-hsu:anrdetection:1.0.2")
}
- In your Application class, initialize the ANR-Detection plugin:
import com.allenhsu.flipper.anrdetection.ANRDetectionFlipperPlugin
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
SoLoader.init(this, false)
val client = AndroidFlipperClient.getInstance(this)
/*
add ANR-Detection plugin to flipper
*/
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
client.addPlugin(ANRDetectionFlipperPlugin(this))
}
client.start()
}
}
To use the plugin with Flipper Desktop: