android - Retrieving Media File's MetaData Pre MediaMetaDataRetriever (API 10) -


i support api level 8 in application , able file's meta data in api levels 8 , 9 10 , above.

for above , including level 10 using mediametadataretriever can't seem find alternative use.

my question

what should use retrieve file's meta data in api levels pre-10?

a code example useful.

you can use ffmpegmediametadataretriever (api 7+). has same interface mediametadataretriever:

import wseemann.media.ffmpegmediametadataretriever;  ...  ffmpegmediametadataretriever mmr = new ffmpegmediametadataretriever(); mmr.setdatasource(muri); mmr.extractmetadata(ffmpegmediametadataretriever.metadata_key_album); mmr.extractmetadata(ffmpegmediametadataretriever.metadata_key_artist); bitmap b = mmr.getframeattime(2000000, ffmpegmediametadataretriever.option_closest); // frame @ 2 seconds byte [] artwork = mmr.getembeddedpicture();  mmr.release(); 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -