android - How to play an alarm sound when 'no interruptions' is set in lollipop? -
i able play tune in app, when volume off so:
audiomanager amanager = (audiomanager) getsystemservice(context.audio_service); int maxvolume = amanager.getstreammaxvolume(audiomanager.stream_alarm); amanager.setstreamvolume(audiomanager.stream_alarm, maxvolume, 0);
... in alarm clock app obvious reasons. unfortunately, in lollipop no longer works when 'no interruptions, not alarms' turned on: phone stays silent.
however, stock alarm clock still works 'interruptions off', , wonder differently.
Comments
Post a Comment