There is a code:
Intent in=new Intent(Intent.ACTION_PICK,EXTERNAL_CONTENT_URI); in.setType("image/*"); in=Intent.createChooser(in,"Виберіть картинку"); startActivityForResult(in,REQUEST_CODE); The address I get is content: // media / external / images / media / 8967
However, Picasso does not load it: Picasso.with(getActivity()).load(recipe.getUrl()).into(imageView);
Well
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == REQUEST_CODE && resultCode == RESULT_OK) { Uri uri; if (data!=null) { uri=data.getData(); Recipe recipe=getRecipeFromFragment(); recipe.setUrl("file://" + uri.toString()); Log.i("uri", recipe.getUrl()); RecipeLab.getInstance(this).updateRecipe(recipe); } } }