在Android中选择视频的最佳方式是什么?

时间:2011-03-08 09:31:58

标签: android android-intent mediastore

我的照片中有一个完美的 Intent.ACTION_PICK

  

startActivityForResult(新   意图(Intent.ACTION_PICK,                                     android.provider.MediaStore.Images.Media.INTERNAL_CONTENT_URI)   SELECT_IMAGE);

但它不适用于视频。当我点击我的列表中的视频时,它会播放视频而不是发回给我。

  

startActivityForResult(new Intent(Intent.ACTION_PICK,android.provider.MediaStore.Video.Media.INTERNAL_CONTENT_URI),   SELECT_VIDEO);

enter image description here

一个想法?

1 个答案:

答案 0 :(得分:13)

您想使用Intent.ACTION_GET_CONTENT并指定video/*来传递给Intent.setType的类型。有关示例,请参阅Stackoverflow - Android access videos and photos on Android 1.5

相关问题