android - Can not play video from my internal application directory -
it looks can not play videos stored in internal application directory.
i have videos stored in /data/data/my.package.org/files/
and i'm trying play file there using
string fpath = "/data/data/my.package.org/files/video.mpg" intent intent = new intent(intent.action_view); intent.setdataandtype(uri.parse(fpath), "video/*");
but both android default video player , external videoplayer (mx player) 'this video can not played".
whereas when i'm saving videos sd card played fine.
why that?
put video in assets folder , use code play video mediaplayer
inputstream = getresources().getassets().open("video.mpg");
or
put video in assets folder and...
string fpath = "/data/data/my.package.org/assets/video.mpg" intent intent = new intent(intent.action_view); intent.setdataandtype(uri.parse(fpath), "video/*");
Comments
Post a Comment