Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Get default or currently set alarm sound/tone?

I searched with many terms and sentencing but could not find any information on this whatsoever. So anyways: How can I get default or currently set music/tone/sound for Alarm (Default app) ?

Say if I wake up every morning with alarm song playing: Song#1 using default alarm app, how can I get that Song#1 in my custom app?

I am trying to create my own alarm app but I don't want to set a tone that user may not like.

Perhaps there is a way to open default alarm tone picker/browser and let user set it in my custom app? Or does all of that need to be custom coded?

If none of above is possible - How can I just get default alarm sound to play in my app?

like image 289
arleitiss Avatar asked Jul 15 '14 19:07

arleitiss


People also ask

How do I change my default alarm ringtone?

Tap on Sounds. Tap on Advanced. Tap on Default alarm sound. Choose an alarm tone and confirm.

Can you customize alarm sound on Android?

On the alarm you want, tap the Down arrow . Tap the current sound's name. Next to "Sounds," tap YouTube Music, Pandora, or Spotify. Find a song you want to use, then tap it.


1 Answers

Uri alarmTone = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_ALARM);
Ringtone ringtoneAlarm = RingtoneManager.getRingtone(getApplicationContext(), alarmTone);
ringtoneAlarm.play();
like image 84
Jay Snayder Avatar answered Sep 27 '22 03:09

Jay Snayder