Tuesday, August 7, 2012

[android-developers] Re: Media Scanning Completed Toast message appears only sometimes

Hi,

It looks like "Media Scanning completed" toast message comes
whenever the device is rooted. I find that the toast message comes
when I connect the device to a computer and I get this message
"Connected as a Media Device". Is that right?

Sometimes when the device is not connected to a computer and I have
the gallery opened and add new videos and try to refresh it through
the above code:

sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,
Uri.parse("file://" + Environment.getExternalStorageDirectory())));

I get this toast message "SDcard inserted. gallery is closed to
scanning media files on SDcard". Is there any way to check if the
gallery is closed and prevent the gallery refresh that I call in code?

I am using Samsung Galaxy SII to check.

Thank you,
B.Arunkumar

On Aug 7, 4:27 pm, "B.Arunkumar" <awsnetworkrecor...@gmail.com> wrote:
> Hi,
>
>       I add mp4 videos to the SDCard through my code and use this to
> refresh the gallery:
>
> sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,
> Uri.parse("file://" + Environment.getExternalStorageDirectory())));
>
> But I get the toast message "Media Scanning Completed" only sometimes
> and sometimes it does not appear. Could somebody explain why we get
> this toast sometimes and sometimes we don't get it?
>
> Thank you,
> B.Arunkumar

--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate