Save Audio File As Ringtone

I’d like to have ringtones be an unlockable reward in my game.

Is there a way to:

1.) Export an audio file to a specified directory? media.save() seems to just export images to a picture directory.

2.) Set a file as a ringtone? I know how to do this in native android, but can’t find anything about it in Corona.
 

Bump. Does anyone have an answer to this problem?

You can save the file out to a directory, but it isn’t possible to set this as a ringtone unless you use Corona Enterprise and implement the native code to handle it.

How do you save the file out to a directory?

What exactly is the file in question? Just an audio file located in your resources bundle? A file recorded within your app?

Need a bit more detail then I can provide the best answer :slight_smile:

It’s an audio file located in the resources bundle. Sorry, I thought that was implied based on my attempted usage of media.save() :slight_smile:

Got it :slight_smile:

Please see this guide: http://coronalabs.com/blog/2013/02/13/faq-wednesday-sub-folder-and-file-access/

Specifically the “How do you copy a file to a sub-folder?” section.

Bump. Does anyone have an answer to this problem?

You can save the file out to a directory, but it isn’t possible to set this as a ringtone unless you use Corona Enterprise and implement the native code to handle it.

How do you save the file out to a directory?

What exactly is the file in question? Just an audio file located in your resources bundle? A file recorded within your app?

Need a bit more detail then I can provide the best answer :slight_smile:

It’s an audio file located in the resources bundle. Sorry, I thought that was implied based on my attempted usage of media.save() :slight_smile:

Got it :slight_smile:

Please see this guide: http://coronalabs.com/blog/2013/02/13/faq-wednesday-sub-folder-and-file-access/

Specifically the “How do you copy a file to a sub-folder?” section.

I have a soundboard app and I was wondering if there is a way to be able to set the sounds as ringtones? For example if you hold down the button it will give you the option to save as ringtone.  I don’t have the enterprise edition as mentioned above, so is there any other way?

I’ve searched the forums and other sources and I still haven’t found a solution to this.  Is seems the only was this can be done is through coding natively… There is no way to do this with Corona? 

I have a soundboard app and I was wondering if there is a way to be able to set the sounds as ringtones? For example if you hold down the button it will give you the option to save as ringtone.  I don’t have the enterprise edition as mentioned above, so is there any other way?

I’ve searched the forums and other sources and I still haven’t found a solution to this.  Is seems the only was this can be done is through coding natively… There is no way to do this with Corona? 

Bump - any news on this?

I don’t know how Android phones handle ring tones, so I can only speak for iOS.  I’ve never seen an app that could save a ring tone to the device.  Every ringtone app saves it’s ringtone files to system.DocumentsDirectory and sets the flag that allows iTunes to see the file.  You then save the file to your local computer out of iTunes and then add it back to the iTunes library and then sync the phone with the new ringtone selected.

Do you know of an app that can write ringtones directly to the device?

Corona SDK supports the flag that allows iTunes to see files. 

Rob

I’m developing for Andriod so not sure about IOS.  I know apps written with native code can easily set tones to ring tones.  Check out the screen shot of this app (Not mine, just picked a random) and you can see the option to save a sound from a soundboard as ringtone.  I would have thought that Corona would be able to do the same.

https://play.google.com/store/apps/details?id=com.klaxnek.lotr.soundboard&hl=en