Android:给定Word的Youtube搜索应用程序

2 youtube search android

我想创建一个Android搜索应用程序,可用于从youtube搜索给定单词的视频.

我怎么做.请有人给我一个教程链接.谢谢

Chi*_*rag 6

请尝试以下代码.

Intent intent = new Intent(Intent.ACTION_SEARCH);
intent.setPackage("com.google.android.youtube");
intent.putExtra("query", "Android");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
Run Code Online (Sandbox Code Playgroud)