java - Save Uri as a file android -


so in app receiving image application

      intent intent = getintent();     string action = intent.getaction();     string type = intent.gettype();     if (intent.action_send.equals(action) && type != null) {         handlesendimage(intent); // handle single image being sent  public void handlesendimage(intent a) {     uri pic = (uri) a.getparcelableextra(intent.extra_stream); } 

from here want save uri image in image gallery. know how save file in gallery not sure how uri in correct format save it. know contains image because picview.setimageuri(pic); causes picture appear in activity. want able save image gallery. ideas on how that? thought convert imageview bitmap , go there seems inefficient me , there has better way it. since know can create uris files can create file uri?


Comments

Popular posts from this blog

c# - SelectList with Dictionary, add values to the Dictionary after it's assigned to SelectList -

how can i manage url using .htaccess in php? -

ios - I get the error Property '...' not found on object of type '...' -