Hi,

I am trying to insert images into my custom content provider.
this is my piece of code where i try to insert..

  ContentValues values = new ContentValues();
            values.put(ImageProvider.KEY_ID, position);
            values.put(ImageProvider.KEY_TITLE,"bluezz.png");
            Uri insertedUri =
getContentResolver().insert(Uri.parse(ImageProvider.CONTENT_URI),
values);
            try {
                OutputStream outStream =
getContentResolver().openOutputStream(insertedUri);///LINE 1
                b.compress(Bitmap.CompressFormat.PNG, 50, outStream);
                outStream.close();
            } catch (Exception e) {
                Log.e(ImageProvider.TAG, "exception while writing
image", e);
            }

but this(LINE 1) is throwing me up with an exception "
java.io.FileNotFoundException:No files supported by provider."

I have searched a lot on internet for the solution but in vain.
can anybody please provide some solution for my problem

Thanks in advance,
Grace.




-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to