Code example for ContentValues

Methods: insertput

0
    		 
	} 
	/***************************************************************************************/ 
	public static void takePict(Activity a, String fileName) {
		 
		ContentValues values = new ContentValues();
		values.put(MediaStore.Images.Media.TITLE, fileName);
		values.put(MediaStore.Images.Media.DISPLAY_NAME, fileName);
		values.put(MediaStore.Images.Media.DESCRIPTION,MIT_TAG);
         
		imageUri = a.getContentResolver().insert(
				MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
		 
		// start external camera app... 
		Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
		intent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);  // if specified, image written here, else Bitmap returned
		intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
		intent.putExtra(MediaStore.EXTRA_FINISH_ON_COMPLETION, false);
		//intent.putExtra(MediaStore.EXTRA_SHOW_ACTION_ICONS, true); // froyo? 
		 
		a.startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);