browsing and playing audio and video files in android -



browsing and playing audio and video files in android -

i developing project in need play sound , video files. when sound player clicked should display sound files sdcard , play files.

when video player clicked need display video files , play video files.

i using media player playing files.

mediaplayer mp = new mediaplayer(); string filepath = environment.getexternalstoragedirectory()+"/f.mp3"; mp.setdatasource(filepath); mp.start();

but problem is,how browse audio/video files , set info source dynamically when user selects particular file.

you should utilize mediastore has separate contentprovider sound , video

http://developer.android.com/reference/android/provider/mediastore.html

audio : http://developer.android.com/reference/android/provider/mediastore.audio.html

video : http://developer.android.com/reference/android/provider/mediastore.video.html

android audio video

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -