Using media scanner

by ivan » Thu, 30 Apr 2009 06:54:00 GMT


Sponsored Links
 Hello,

I'm trying to use the MediaScannerConnection class to update my
external audio content provider.

I download an MP3 file to:

/sdcard/Music/

When the download is complete I successfully scan it, but the file is
scanned to the internal audio content provider...

the uri looks like "/internal/audio/media/55".

Is there a way to control the content provider that the media scanner
scans to?

-Ivan
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. access parent's protected variable when extend a android class!

I liked to extend a Gallery widget class, so I tried to extend and
I faced the problem of using protected variable.

this is a Gallery source
@Override
    protected void onLayout(boolean changed, int l, int t, int r, int
b) {
        super.onLayout(changed, l, t, r, b);
          /*
         * Remember that we are in layout to prevent more layout
request from
         * being generated. [android comment]
         */
        mInLayout = true;
        layout(0, false);
        mInLayout = false;
    }
and I changed
@Override
protected void onLayout (boolean changed, int l, int t, int r, int b)
{
    super.onLayout (changed, l, t, r, b);
    mInLayout = true;
    MyLayout (0, false);
    minLayout = false;
}

I build.. and result is
/home/bobos26/work/devel/omap_test/packages/apps/Launcher/src/com/
android/launcher/WRGallery.java:27: mInLayout is not public in
android.widget.AdapterView; cannot be accessed from outside package
        mInLayout = true;
        ^
the result log mean that I can't accessed the protected variable
mInLayout from outside package. I think I can access a parent's
protected variable when extending class in Object oriented
programming theory. am I wrong? and is there a good solution to access
a parent's protected variable?

--~--~---------~--~----~------------~-------~--~----~

2. NinePatchDrawable constructor

I am trying to create a NinePatchDrawable programmatically, but there
is no documentation on the constructor's argruments (Bitmap bitmap,
byte[] chunk, Rect padding, String srcName).  Does anyone know what
chunk and padding are... and how to specify them?

Thanks.
--~--~---------~--~----~------------~-------~--~----~

3. Change height of notification?

4. Issue with Threads and onCreate()

5. alternative for com.google.googlenav package

6. How-To: Display Emulator in Landscape (Sideways) View?

7. Segmentation fault if i run dalvikvm on ppc