سؤال

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?

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top