Question

Is copying (audio)data from the MediaStore database (like path, title, artist etc.) to classes a good practice or should it be handled directly from the database? Is it necessary to create an instance of class "Song" for each song in the database? My main concern is that for huge audio collections it could end up with quite a lot of memory being used.

Was it helpful?

Solution

Depending on what you are doing with the data it is probably fine to create instances of a Song class. Presumably you are just saving some strings/ints to each class so memory shouldn't be a big problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top