Code example for FileNotFoundException

Methods: printStackTrace

0
		Uri uri = mComic.getUri(index);
		String path = uri.getPath();
		try { 
			return MediaStore.Images.Media.insertImage(mContext.getContentResolver(), path, mComic.getName(), mComic.getName());
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			return null; 
		} 
	} 
	 
	protected void onPostExecute (String result) {
		if (result != null) {
			Intent intent = new Intent(Intent.ACTION_ATTACH_DATA);
			intent.setDataAndType(Uri.parse(result), "image/jpeg");
			intent.putExtra("mimeType", "image/jpeg");
			Intent chooser = Intent.createChooser(intent, mContext.getString(R.string.item_set_as_title));
			mContext.startActivity(chooser);
		} 
	} 
}