code: public static Intent newPlayMediaIntent(Uri uri, String type) {
          Intent intent = new Intent(Intent.ACTION_VIEW);
          intent.setDataAndType(uri, type);
          return intent;
      }
docs: Open the media player to play the given media Uri
  
  @param uri  The Uri of the media to play.
  @param type The mime type
  @return the intent