Android ContentResolver with data on a USB stick

412 views Asked by At

I am writing an application for an Andriod tablet (3.2) that plays media that in my case is stored on a USB stick. However, I noticed that when the USB stick is NOT plugged in, the ContentResolver returns songs that are stored on the USB stick. Is there a way to make sure my content resolver only returns media that can actually be found in the filesystem? I.E. stop showing me songs on a USB stick that isn't plugged in right now?

1

There are 1 answers

0
gillonba On BEST ANSWER

I never did find a way to force a refresh, but it looks like Android does refresh its database periodically on its own. Not sure how 4+ handles it