ボリュームの種類を選ぶ
ボリュームの種類
AudioManager | Android Developers
int | STREAM_ALARM | The audio stream for alarms |
int | STREAM_DTMF | The audio stream for DTMF Tones |
int | STREAM_MUSIC | The audio stream for music playback |
int | STREAM_NOTIFICATION | The audio stream for notifications |
int | STREAM_RING | The audio stream for the phone ring |
int | STREAM_SYSTEM | The audio stream for system sounds |
int | STREAM_VOICE_CALL | The audio stream for phone calls |
ソース
Notification notify = new Notification(R.drawable.icon, "notice!", System.currentTimeMillis()); notify.audioStreamType = AudioManager.STREAM_ALARM;
これでアラームの音量が適用されます
参考
[音量設定アプリ] 第1回 着信音量を設定する方法 | Techfirm Android Lab
http://labs.techfirm.co.jp/android/k-matsuda/180