Fix only the crash of Register too many Broadcast Receivers
on Huawei's mobile phone.
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);
}
}
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();
}
});
}
}