Guest User

Untitled

a guest
Jan 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Intent lance = new Intent();
  2. lance.setAction(Intent.ACTION_VIEW);
  3. String typedata = "image/*";
  4. lance.setType(typedata);
  5. String phuri = "content://" + URI_AUTORITE
  6. + "/" + URI_CONTENU_FICHIERS
  7. + directory + filename;
  8. Uri uri = Uri.parse(phuri);
  9. lance.setDataAndType(uri, "image/*");
  10. startActivity(lance);
  11.  
  12. Intent lance = new Intent();
  13. lance.setAction(Intent.ACTION_VIEW);
  14. String typedata = "image/*";
  15. lance.setType(typedata);
  16. String phuri = "content://" + URI_AUTORITE
  17. + "/" + URI_CONTENU_FICHIERS
  18. + directory + filename;
  19. Uri uri = Uri.parse(phuri);
  20. ClipData ensemble = ClipData.newRawUri("Photos", uri);
  21. lance.setClipData(ensemble);
  22. startActivity(lance);
Add Comment
Please, Sign In to add comment