Skip to content

Latest commit

 

History

History
41 lines (33 loc) · 1.1 KB

README_JAPANESE.md

File metadata and controls

41 lines (33 loc) · 1.1 KB

BlockCanary

A transparent ui-block detection library for Android. App only needs one-line-code to setup and provide application context.

How it works

See BlockCanary.

Usage

public class DemoApplication extends Application {
    @Override
    public void onCreate() {
        ...
        // Do it on main process
        BlockCanary.install(this, new AppBlockCanaryContext()).start();
    }
}

Implement application context:

public class AppBlockCanaryContext extends BlockCanaryContext {
    // override to provide context like app qualifier, uid, network type, block threshold, log save path
}

Import

dependencies {
    // or you can use compile directly if want to enable it in release package and upload log file to server
    // compile 'com.github.moduth:blockcanary:1.0.0'
    debugCompile 'com.github.moduth:blockcanary:1.0.0'
    releaseCompile 'com.github.moduth:blockcanary-no-op:1.0.0'
}

Screenshot

Block detail Block list