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