how to get file name from URI

后端 未结 8 631
花落未央
花落未央 2020-12-16 15:46

Hello I am develop video player with android gallery. I receive URI from gallry. and I need to display video title, when play video. so if content has not title meta data. I

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-16 16:04

    int actual_image_column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA); 
    String filename = cursor.getString(actual_image_column_index);
    

    This is example for Image . you can try same thing for your needs ( video).

    Thanks & Best Luck :)

提交回复
热议问题