Can't Play This Video. Android VideoView Mp4 Recorded By Android Device


Answer :

Please refer below code snippet...problem was with the path declaration..

 String uriPath = "android.resource://"+getPackageName()+"/"+R.raw.aha_hands_only_cpr_english;         Uri uri = Uri.parse(uriPath);         mVideoView.setVideoURI(uri); 

Thats it...


I tried everything mentioned before but it turns out that internet permission is needed to play a mp4 file.

<uses-permission android:name="android.permission.INTERNET" /> 

Comments

Popular posts from this blog

Converting A String To Int In Groovy

"Cannot Create Cache Directory /home//.composer/cache/repo/https---packagist.org/, Or Directory Is Not Writable. Proceeding Without Cache"

Android How Can I Convert A String To A Editable