How to get duration of a video file?

后端 未结 7 408
暖寄归人
暖寄归人 2020-12-07 20:07

I\'m a beginner in Android programming.

I\'m writing an application to list all video file in a folder and display information of all videos in the folder. But when

相关标签:
7条回答
  • 2020-12-07 20:47

    I don't think you post your URI into the mediastore video query

    Uri uri = Uri.parse("content://media/external/video/media/9");
    
    Cursor cursor = MediaStore.Video.query(res, data.getData(), new String[]{MediaStore.Video.VideoColumns.DURATION});
    
    0 讨论(0)
提交回复
热议问题