Code example for Bitmap.CompressFormat

Methods: name

0
			sCurrentUri = Uri.fromFile(tempFile);
			 
			Log.d(TAG, "Creating temporary file for gallery image: " + sCurrentUri.toString());
			 
			intent.putExtra(MediaStore.EXTRA_OUTPUT, sCurrentUri);
			intent.putExtra("outputFormat", Bitmap.CompressFormat.JPEG.name());
			 
			Log.d(TAG, "Requested gallery intent...");
			startActivityForResult(intent, REQUEST_CODE);
		} catch (IOException e) {
			setResult(RESULT_CANCELED);
			finish();
		} 
	} 
	 
	@Override 
	protected void onActivityResult(int requestCode, int resultCode, Intent data) {
		super.onActivityResult(requestCode, resultCode, data);
		 
		if (requestCode == REQUEST_CODE) {
			Log.d(TAG, "Got photo from gallery...");