Code example for File

Methods: fromFile

0
		} 
		return format;
	} 
 
	public static Uri getImageUri(String path) {
		return Uri.fromFile(new File(path));
	} 
 
	public static Bitmap getBitmap(String path) {
		try { 
			InputStream in = new FileInputStream(path);
			return BitmapFactory.decodeStream(in);
		} catch (FileNotFoundException e) {
			return null; 
		} 
	} 
 
	public static BitmapFactory.Options getBitmapOptions(String path) {
		BitmapFactory.Options options = new BitmapFactory.Options();
		if (StringUtil.isEmpty(path)) {
Stop searching for code, let great code find you!  Add Codota to your java IDE