fennifith / Alarmio

A simple alarm clock focused on design, readability, and internet radio.
https://play.google.com/store/apps/details?id=me.jfenn.alarmio
Apache License 2.0
338 stars 95 forks source link

Detailed Audio Options in Ringtone Picker #32

Open fennifith opened 5 years ago

fennifith commented 5 years ago

It seems you can't change the volume of the 'alarms' channel on some skins of Android. Either that or it just isn't very intuitive to do so. Yay, more things to do.

This should also involve the ability to pick which audio stream the alarm will play from; the "alarms" channel should be the default, but media audio would be useful sometimes as well - to play the alarm over a bluetooth speaker, for example.

UriahShaulMandel commented 5 years ago

Hi!, first, thank you for open sourcing this great app! it really helped me to understand how to open source my platform.

I had a similar issue when created my simple alarm, and solved it like this: Before getting the ringtone, I called audioManager.setStreamVolume(AudioManager.STREAM_ALARM, alarmVolume, 0); And added in the settings a bar which controls alarmVolume.

this specific code is taken from here. (sorry for it being a bit messy)

I hope this can help you :)

fennifith commented 5 years ago

Thank you @UriahShaulMandel, I'm glad you found it useful!

This issue is mostly waiting on me having the time to figure out how to design the volume slider and where to put it (I might have to rewrite a lot of the sound picker dialog in order to do this... ugh), but thank you for the info, it will save me from looking up the documentation when the time comes :+1: