Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. content://com.android.providers.media.documents/document/image:3951
  2.  
  3. public static void openImage(Fragment f, Uri uri) {
  4. Intent intent = new Intent(Intent.ACTION_VIEW);
  5. intent.setDataAndType(uri, "image/*");
  6.  
  7. f.startActivity(intent);
  8. }
  9.  
  10. public static void playSound(Fragment f, Uri uri) {
  11. Intent intent = new Intent(Intent.ACTION_VIEW);
  12. intent.setDataAndType(uri, "audio/*");
  13.  
  14. f.startActivity(intent);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement