如何使用视频文件路径获取视频标题,艺术家和持续时间?

时间:2013-11-25 03:47:42

标签: android mediastore

如何使用sdcard中的FilePath获取媒体信息,如视频的标题和艺术家?

ACTIVITY A

public void onListItemClick(ListView l, View v, int position, long id) {
        // MOVE TO CLICK POSITION
        if (videoCursor.moveToPosition(position)); {
            videoPathColumnIndex = videoCursor
                    .getColumnIndexOrThrow(MediaStore.Video.Media.DATA);

            String path = videoCursor.getString(videoPathColumnIndex);
            videoIntent = new Intent(this, Play.class);
            videoIntent.putExtra("keykey", path);
                    videoIntent.putExtra("bmpbmp", bmp);
                    startActivity(videoIntent);

        }
}

ACTIVITY B

private void getMediaInfo() {
        videoIntent = getIntent();
        extras = videoIntent.getExtras();

        String path = extras.getString("keykey");
            Bitmap = (Bitmap) videoIntent.getParcelableExtra("bmp");
        MediaStore.Video.Media.
}

如何使用视频路径列出使用路径的视频标题,艺术家或持续时间? 如何正确传递不会影响性能问题的img?

0 个答案:

没有答案