If you don't want your files scanned I think you're supposed to put a 
".nomedia" into the folder.

On Tuesday, April 2, 2013 10:18:37 PM UTC+1, Nathan wrote:
>
> I did get a log from a user using the Droid Razr Maxx HD, my nemesis. 
>
> As usual, logs are useless for diagnosing a problem where there is a hard 
> freeze.
>
> But in the log, there are 
> 03-31 21:57:06.413 V/MediaProvider( 3315): query: 
> uri=content://media/external/file, selection=_data LIKE ?1 AND 
> lower(_data)=lower(?1) /storage/sdcard1/b/t/o/15/9556/14161.ext
>
> I will testify sincerely that I have never willfully called the media 
> provider for said file. I have not use the Media provider apis to access a 
> file. 
>
> Instead I am using code like the following:
> File f("/storage/sdcard1/b/t/o/15/9556/14161.ext");
>
> if(f.exists()&&f.length()>0)
>  .....
>
>
> Is a call to File.exists() being converted under the hood to a call to the 
> MediaProvider? 
> Is this common?
>
> I foresee certain problems with this scenario. 
> To give the poor media scanner a break from sorting through lots of little 
> files, I have included a .nomedia file in that folder. 
> If that folder is being skipped, then a query to the mediaprovider will 
> return false when the file actually exists. In some situations, this could 
> cause me to redownload a file from a remote server that already exists. 
> If the .nomedia is being ignored and it is scanning those folders, that 
> puts a strain on the media scanner that I would rather avoid. 
>
> Can anyone give me any insight?
>
> Nathan
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to