Java tutorial
//package com.java2s; import android.net.Uri; public class Main { private static String YOUTUBE_PLAY_BASE_URL = "https://www.youtube.com/watch"; private static String YOUTUBE_VIDEO_KEY_PARAM = "v"; public static Uri getYoutubeTrailerUrl(String videoKey) { Uri videoUri = Uri.parse(YOUTUBE_PLAY_BASE_URL).buildUpon() .appendQueryParameter(YOUTUBE_VIDEO_KEY_PARAM, videoKey).build(); return videoUri; } }