Question

I'm reading some sources for Android, and I read this:

OutputStream thumbOut = mCr.openOutputStream(uri);
bitmap.compress(Bitmap.CompressFormat.JPEG, 85, thumbOut);
thumbOut.close();

when trying to store a bitmap (bitmap) in a database (uri is the URI of a row in the database). As far as I can understand, openOutputStream allows to store binary data in the database, but only the path of the file is placed in the DB. The file is placed somewhere in the filesystem. Is this correct? My question is: how do I specify the exact location of the files when stored this way? Thanks for any clarification.

Was it helpful?

Solution

I suppose the correct answer to this question was that the used path is the one already inserted in the database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top