Android native alarm application sound files: Download and reuse

155 Views Asked by At

I am developing an application and I wanted to use some of the alarm tone files that are in the android native alarm application. Examples are Morning Scent, Melody Alarm, Country Road and so on.

My questions are: 1. Where do I locate these sound files? 2. What is the license for these sound files?

2

There are 2 best solutions below

0
On BEST ANSWER

They are available in the directory of : /system/media/audio/alarms

About license , I have no idea. Maybe those of Google are ok

1
On

You can get the Alarmtones or ringtones as they are by below code

Intent intent = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);
startActivityForResult(intent, 1);

This will show a picker dialog with the list of sounds available. Then on selecting any of them you will get the result and must receive it in onActivityResult()

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);

    if (resultCode == Activity.RESULT_OK) {

           alarmTone = data.getParcelableExtra(RingtoneManager.EXTRA_RINGTONE_PICKED_URI);
    }}