i faced problem about broadcast receiver of boot completed in android 11 it was working under android 11 but on this version doesn't work, what can i enable in settings or update my source code
public class BootCompletedReceiver extends BroadcastReceiver {
private String TAG = "BootCompletedReceiver";
@Override
public void onReceive(final Context context, Intent intent) {
Timer timer = new Timer();
timer.schedule(new TimerTask() {
boolean isDialerAppLaunched = false, isDialerAppClosed = false;
int dialerAppLaunches = 0;
@SuppressLint("LongLogTag")
@Override
public void run() {
// TODO Auto-generated method stub
Log.d(TAG, "boot completed receiver is working ...");
Intent intentRegisterDisplay = new Intent(context, RegisterDisplayActivity.class);
intentRegisterDisplay.addFlags(FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intentRegisterDisplay);
}
}, 15000);
}
}
i tried to search allow some permissions in settings of android 11