Skip to content

Fix only the crash of Register too many Broadcast Receivers on Huawei's mobile phone.

License

Notifications You must be signed in to change notification settings

llew2011/HuaWeiVerifier

Repository files navigation

HuaWeiVerifier

Fix only the crash of Register too many Broadcast Receivers on Huawei's mobile phone.

How to usage

dependencies {
    // add dependencies
    implementation 'com.llew.huawei:verifier:1.1.2'
}
public class SimpleApplication extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        LoadedApkHuaWei.hookHuaWeiVerifier(this);
    }
}
or with callback like this:
public class SimpleApplication extends Application {

    public static SimpleApplication INSTANCE;

    @Override
    public void onCreate() {
        super.onCreate();
        INSTANCE = this;
        LoadedApkHuaWei.hookHuaWeiVerifier(this, new LoadedApkHuaWei.TooManyBroadcastCallback() {
            @Override
            public void tooManyBroadcast(int currentIndex, int totalCount) {
                Toast.makeText(SimpleApplication.INSTANCE, "too many broadcast registed " + totalCount, Toast.LENGTH_SHORT).show();
            }
        });
    }
}

Blog Site

http://blog.csdn.net/llew2011/article/details/79054457

About

Fix only the crash of Register too many Broadcast Receivers on Huawei's mobile phone.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages