我可以用这段代码打开画廊,
Intent intent = new Intent(Intent.ACTION_PICK);
intent.setType("video/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Video"), PICK_VIDEO_REQUEST );
Run Code Online (Sandbox Code Playgroud)
它适用于三星Galaxy S5.但在某些手机中,图像会随视频一起显示.
我需要对代码进行哪些更改才能打开图库以仅显示视频?
返回结果时,如何获取所选视频的真实路径?
Android Studio中使用时,我只是编码100%的CPU,即使我键入一个单词的CPU使用率提高到100%,涉及到返回正常的,如果我继续键入需要100%的CPU所有的时间.
我试过的是:
.android和.AndroidStudio3.0文件夹c:\users\username\我正在运行Windows 7 64位操作系统和Android Studio 3.0以及我昨天重新安装的操作系统.我没有安装.android,Android Studio使用默认.AndroidStudio3.0.
我在互联网上搜索但没有帮助.任何帮助,将不胜感激.