Search code examples
androidandroid-listviewandroid-video-playerandroid-videoview

big video file in ListView containing a VideoView


I have an endless ListView (like explained here) which also contains an VideoView. Problem is that with the 270MB video which right now is placed in the RAW folder, the ListView is somehow laggy and the building of the app takes for ever. What is the right way to handle with a big video file?

Edit: I also sometimes get this error message when building the app:

Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]


Solution

  • you can't build apk file for more than 50 Mb. If your apk is more than 50 Mb then you have to use apk expansion. So, don't put such a large file in your raw folder.

    Secondly if you want to have video in list view you can go with this approach.

    Put only the video thumbnail(Image) in list view and on clicking the thumbnail or list view open the video Player. But don't add videoView to you list row.