Reputation: 366
I have a BaseActivity class which is inherited from other Activities. This is the onResume in BaseActivity class.
@Override
protected void onResume() {
super.onResume();
if (!CustomSystem.isUpdateServiceStarted()) {
UpdateService.started = false;
startService(new Intent(this, UpdateService.class));
timerCheckStarted = new CountDownTimer(500, 500) {
...
};
timerCheckStarted.start();
} else {
UpdateService.wakeUp(BaseActivity.this);
}
}
On my firebase page, I see that an BackgroundServiceStartNotAllowedException is thrown only in Android 12 and 13.
I imagine that is linked to the restrictions introduced from android 12 , but I can’t figure which is the problem.
Upvotes: 3
Views: 1741