Android internal and external storage

I have an application that accesses music, and I had at least one user complaining that some of his songs are in the internal storage, and this leads to closing force.

My question is: do I need to make 2 calls for each song now, or can I make a request that will consider both internal and external memory?

+4
source share
3 answers

Multimedia is not my strong suit, but I think the media scanner will keep an index of what it is. Another option would be to view the launch in which the multimedia files are located, and write this data to SharedPreferences for later use.

0
source

see my answer in this post: fooobar.com/questions/787619 / ...

ContentProvider is the key

I have an application that uses external and internal memory to save images, and I needed to use the gallery to view them in some kind of environment, and it gave an error if I tried to pass a uri pointing to the internal memory

fooobar.com/questions/787619 / ...

so I solved my problem ... and yours :)

0
source

It depends on how the manufacturer implemented its MediaProvider / Scanner, etc., since there is no standard for more than one flash device (SD).

-1
source

Source: https://habr.com/ru/post/1314795/


All Articles