I'm getting an java.lang.IllegalArgumentException
with the following message regist too many Broadcast Receivers
(yes, the message says regist
and not register
) when trying to get the latest ACTION_BATTERY_CHANGED
sticky intent.
I use the following code:
Intent latestStickyIntent = getApplicationContext().registerReceiver(null, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
As you can see, there is no actual register of a new receiver since i'm using null
as the BroadcastReceiver.
As far as I can see, this only happens for a single user on a HUAWEI RIO L01 device but I can't say if that's the cause.
Anyone had a similar experience with that error?
UPDATE (03/2016):
Started seeing the same issue on other Huawei devices (ALE L04, G7 L03) but still no devices from other manufacturers.
This is the confine of huawei's mobile phone system. Huawei's mobile phone has a white list mechanism. Only the APP in their white list can avoid this bug. I use reflection to try to solve this bug. may help for you
https://github.com/llew2011/HuaWeiVerifier
dependencies {
// add dependencies
implementation 'com.llew.huawei:verifier:1.0.2'
}
public class SimpleApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
LoadedApkHuaWei.hookHuaWeiVerifier(getBaseContext());
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With