简体   繁体   中英

Android: making a Music Player app more efficient

I am making an android music app. I have a few queries about how to make it more efficient-

  1. Should I store the tracks available on the device, in my app? If yes, what should I use JSON, SQLite or CouchbaseLite ?
  2. How often should I refresh the stored records?

Any other tips will be highly appreciated.

There is no need to save the music in your own app's database, android saves them for you and provides a content provider ( MediaStore ) that allows you restricted access to the content of that database. So every time your app wants to load music from the device, it would use the load music from the Media Store , making your own database would only mean having a copy of the data in the device and that would be waste of memory since you would still have to query your database to get the music. you can learn more about content providers and media store from the following tutorials. Media Store

Content Provider

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM