0

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]

Community
  • 1
  • 1
Daniel Storch
  • 327
  • 1
  • 3
  • 15

1 Answers1

3

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.

Suhail Mehta
  • 5,514
  • 2
  • 23
  • 37
  • Ok thanks for the tip. Could i leave the VideoView without a video file and a thumbnail on top and when someone is pressing, it will load the video? And how should i save the video from start when the app is building? – Daniel Storch Oct 02 '14 at 08:09
  • yaa you can do it but there will be a lag. I will suggest you to open a new fragment or activity what ever you what when the list row is clicked. You can take example how YOUTUBE is doing it. They also have list of videos but they open it in new frame . – Suhail Mehta Oct 02 '14 at 08:14
  • and how should do i save the video properly from start when the app gets build? – Daniel Storch Oct 02 '14 at 08:16
  • you have static videos or you will call a web service to download videos? – Suhail Mehta Oct 02 '14 at 08:19
  • its a one static video. This will never be changed. The app is only there to show this 1 video with some pictures and text. – Daniel Storch Oct 02 '14 at 08:26
  • you should try to compress the video or simply use apk expansion – Suhail Mehta Oct 02 '14 at 08:29