将MP3文件作为铃声 [英] Save mp3 file as ringtone

查看:84
本文介绍了将MP3文件作为铃声的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了你猫一个按钮,听到铃声的应用程序!我如何添加一个选项,将其保存到您的设备作为铃声,如果你喜欢?谢谢

I have made an app that you puss a button and hear a ringtone!How can i add an option to save it to your device as a ringtone,if you like?thanks

推荐答案

http://developer.android.com/guide/topics/data/data-storage.html#filesExternal

应该存储在SD卡/手机铃声

It should be stored on a sdcard /Ringtones

如果你想保存不属于特定于应用程序,并且不应该被删除,当应用程序被卸载后,将它们保存到外部存储的公共目录中的一个文件。这些目录放置在外部存储的根,如音乐/,图片/,铃声/和其他

If you want to save files that are not specific to your application and that should not be deleted when your application is uninstalled, save them to one of the public directories on the external storage. These directories lay at the root of the external storage, such as Music/, Pictures/, Ringtones/, and others.

在API级别8或更大,使用getExternalStoragePublicDirectory(),传递你想要公开目录,如DIRECTORY_MUSIC,DIRECTORY_PICTURES,DIRECTORY_RINGTONES或其他的类型。如有必要,此方法将创建相应的目录。

In API Level 8 or greater, use getExternalStoragePublicDirectory(), passing it the type of public directory you want, such as DIRECTORY_MUSIC, DIRECTORY_PICTURES, DIRECTORY_RINGTONES, or others. This method will create the appropriate directory if necessary.

我读的地方,你可以把它们放在/媒体/铃声,但这未记录其他地方。所以,你应该用什么,他们在该文档中写道。

I read somewhere that you can put them in /media/ringtones but this isn't documented anywhere else. So you should use what they wrote in the docs.

这篇关于将MP3文件作为铃声的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆