Difference between EXTERNAL_CONTENT_URI and INTERNAL_CONTENT_URI?

by kingkung » Fri, 27 Jun 2008 05:42:37 GMT


Sponsored Links
 Trying to store an image to the Image content provider.  Which of the
above should I use to insert an image?  Also, I heard people had
problems with the image content provider... is it (still) broken/non-
functional?

                ContentValues imageValues = new ContentValues();
                imageValues.put(Images.ImageColumns.TITLE, "A Large, Brown
Armadillo");
                Uri uri = _resolver.insert(Images.Media.EXTERNAL_CONTENT_URI,
imageValues);
                OutputStream outStream = _resolver.openOutputStream(uri);
                bitmap.compress(Bitmap.CompressFormat.JPEG, 50, outStream);
                outStream.close();

Thanks,

James



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



Other Threads

1. Layout being displayed too late

Hi guys:
I have the following situation. Attached is a snippet of code that
appears in the OnCreate of my Activity.
_____________________________________
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dbloadschedules);
        mCtx = this;

        setProgressBarVisibility(true);


/*
 * Open/Create the database
 */
        mDbHelper = new myDBAdapter(mCtx);
        mDbHelper.open();

        Load_Table("agencies", "agency.txt",AgencyFlds, mAgencies);
        Load_Table("calendar","calendar.txt",CalendarFlds, mCalendar);
        Load_Table("trips", "trips.txt", TripFlds, mTrips);

    }
_____________________________________________________________________________

The issue is that my layout never gets displayed until the OnCreate
method has compoleted. Since my 3 functions takes about 10 secs to
complete, I have a blank screen being displayed for 10 secs. This
layout has a progress bar which meant to show the progress thru each
function.

Could someone please point out where I am going wrong? Thanks.

-- 

2. J2ME to Android

Does anyone know the equivalent of these imports from J2ME to
Android?

import javax.microedition.io.Connector;
import javax.microedition.io.HttpConnection;
import javax.microedition.io.SocketConnection;
import javax.microedition.io.StreamConnection;

Also, I needed to import midpapi20.jar but I don't want to use
packages
outside Android into my app -- would I be able to find most of the
related packages in Android libs?

Thanks very much

-- 

3. Need to communicate with android browser

4. buffer blocked until process exited

5. system_server proc running out of file descriptors, then Runtime Exception and Restart.

6. Receiving System Intents with Custom Broadcast Receiver

7. calling OpenGL ES 2.0 from native code