I'm writing app that should play sound notification even in silent mode. I don't want to temporarily turn off Silent and roll it back late. I'm using ALARM stream for that now. Usually it works proper, because by default ALARM stream not muted in silent. But sometimes it is.
How can I understand if stream currently muted (in silent mode)? How can I unmute it (without switching to normal mode)?
Answering my own question:
The solution was found in Android OS sources (in standard Alarm app).
I had found way to check and set option "Alarm in Silent":
Link to the Android src: https://android.googlesource.com/platform/packages/apps/AlarmClock/+/donut-release2/src/com/android/alarmclock/SettingsActivity.java