通过代码创建播放列表
对于我的最新项目,我希望用户能够制作播放列表并将其保存到手机上。我想这样做,当他们在应用程序中制作它们时,当他们查看内置音乐应用程序时,它们也会显示出来。这样做的最好方法是什么?我知道我可能必须使用 MediaStore,但除此之外我有点迷失了。任何信息都会有帮助,只需要朝着正确的方向推动 - 谢谢
For my latest project i want the user to be able to make playlist and save them to the phone. I want to make so when they make them in the application they will also show up when they look in the built in music app. Whats the best way of doing this? I know i will probably have to use MediaStore but other than that I'm a tad lost. Any information would help, just need a nudge in the right direction - Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 Media.AudioStore.Playlist 类来访问播放列表内容提供程序。通过将元素插入播放列表内容提供程序,您将能够在音乐应用程序中插入插入的播放列表。
示例代码:
您可以更多地尝试这些类,以更好地了解如何使用它们。请注意 Media.AudioStore.Playlist 具有的内部类, Media .AudioStore.Playlist.Memebers。
You can use the content URI found in Media.AudioStore.Playlist class to access the playlist content provider. By inserting elements into the Playlist content provider you'll be able to the inserted playlists in the Music application.
Example code:
You can play around with the classes more to get a better idea of how to use them. Note the inner class that Media.AudioStore.Playlist has, Media.AudioStore.Playlist.Memebers.