'Android 12: Redirect to Alarms & Reminders settings not working

I want to show snackbar to user, if he has Alarms & Reminders turned off in my App (since Android 12 its mandatory to have this settings enabled in order to register Alarms for example to fire Notifications). But on some phones, it is showing completely different screen without any settings available.

Code:

val snackbar = Snackbar.make(tabBar, getString(R.string.snackbar_alarm_schedule_settings), 7000)
            snackbar.setAction(R.string.snackbar_settings) {
                Intent().apply {
                    action = ACTION_REQUEST_SCHEDULE_EXACT_ALARM
                }.also { startActivity(it) }
            }
            snackbar.view.findText(com.google.android.material.R.id.snackbar_text).run {
                maxLines = 5
            }
            snackbar.show()

Here is comparison of my settings versus how it should look like:

enter image description here

Expectation: enter image description here



Solution 1:[1]

In Java, from activity I do it like this:

startActivity(new Intent(android.provider.Settings.ACTION_REQUEST_SCHEDULE_EXACT_ALARM, Uri.parse("package:"+ getPackageName())));

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 porlicus