4 messages in com.googlegroups.android-developersContent Provider for Images
FromSent OnAttachments
rizwan30 Dec 2007 00:18 
rizwan30 Dec 2007 20:40 
rizwan31 Dec 2007 09:05 
bob chen15 Jan 2008 21:22 
Subject:Content Provider for Images
From:rizwan (rizc@gmail.com)
Date:12/30/2007 12:18:54 AM
List:com.googlegroups.android-developers

Hi! Did Anybody try content provider for images (content//media/imges )I m trying this code snippt

InputStream is = getResources().openRawResource(R.raw.sample_0); bm = BitmapFactory.decodeStream(is); ContentValues values = new ContentValues();//= new values.put(Media.NAME, "road_trip_1"); values.put(Media.DESCRIPTION, "Day 1, trip to Los Angeles"); ContentURI uri = getContentResolver().insert(Media.INTERNAL_CONTENT_URI, values); OutputStream outStream; try { outStream = getContentResolver().openOutputStream(uri); bm.compress(Bitmap.CompressFormat.JPEG, 50, outStream); outStream.close(); } catch (FileNotFoundException e) { text.append(e.toString()); }catch(Exception e){ text.append(e.toString()) ; }

But i m getting NULL pointer Exception Can anybody tell me what I m missing ? any example snippt is most welcome please let me know

Regards