I was wondering what is the best way to play song without having connection network ?
Explanation : I have an application that play some songs. I can play a song whenever I want, even if I m in a tunnel or in a place where I dont have a network connection.
What is the best way to manage it ? Does sqlite sufficient to save a song to a binary format ? Should I store the music in a directory and register the sound path ?
Thanks for advance
You can store song meta-data in SQLite (like: song list, titles, authors...) but storing actual audio data in it is a bad idea. The overhead of storing BLOBs in a database is pretty big. And there is no way to play audio directly off database, so I would have to unload it all to memory or create temporary file.
I suggest you to relay on normal files located on external storage.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.