将媒体文件保存到黑莓 SD 卡
我正在创建一个多媒体应用程序,允许用户保存壁纸和铃声。我知道我需要将它们保存到的路径是“SDCard/BlackBerry/ringtones/file.mp3”(或壁纸的“/pictures”)。我搜索了论坛和帖子几天了,我唯一发现的是如何编写文本文件。现在,假设铃声和图片保存在项目资源文件夹中。如果您能提供任何意见,我将不胜感激。
I am creating a multimedia app that allows the user to save wallpapers and ringtones. I know the path I need to save them to is "SDCard/BlackBerry/ringtones/file.mp3" (or "/pictures" for wallpapers). I have searched forums and post for a couple days and the only thing I found was how to write text files. For now, assume that the ringtones and pictures are saved in the projects resource folder. If you could provide any input, I would greatly appreciate it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
保存任何东西都应该是一样的。尝试这样的事情:
usedir 和 filename 是你的路径组件,raw_media_bytes 是你的数据,等等。
Saving anything should be about the same. Try something like this:
usedir and filename are your path components, raw_media_bytes is your data, etc etc.
谢谢cjp的帮助。以下是将资源 mp3 文件保存到 SD 卡的代码:
正如 cjp 指出的,以下是将图像资源保存到 SD 卡的方法:
Thanks for your help cjp. Here is the code to saving a resource mp3 file to a sd card:
As cjp pointed out, here is how to save an image resource to a SD card: