Android: Creating video thumbnails from Video URI

后端 未结 1 1546
攒了一身酷
攒了一身酷 2021-02-10 03:32

I\'m budiling an application and it lists all the videos i recorded using the recorder in a list. Is it possible for me to create a thumbnail with the help of Uri instead of the

相关标签:
1条回答
  • 2021-02-10 04:23
    public String getRealPathFromURI(Uri contentUri) {
        String[] proj = { MediaStore.Images.Media.DATA };
        Cursor cursor = managedQuery(contentUri, proj, null, null, null);
        int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
        cursor.moveToFirst();
        return cursor.getString(column_index);
    }
    
    0 讨论(0)
提交回复
热议问题