Using large number of videos and images in android application - android

I want to use videos in my android application. There are 800 videos (total size 250MB), so how will I use them in android application?
Same with images 3000 images (50-60 MB)
What will I have to do if I want to use images and videos with total size as mentioned above?

If you need to have them on the
device, you'll have to download them
to the SDcard.
Another option would be streaming
them from the web.
The question is which user would download almost 300MB of media files for one application? The maximum file-size for the Android Market is 50MB. Your App will need to download them to the SDcard (like "Need for Speed").
Another thing would be compressing them, but that would depend on what you want to do with the files.

Related

How to reduce app size for Play console when I have 850 png files in the drawable?

Bare with as this is my first ever question.
I'm developing an Android application and I was ready for it to be reviewed by Google and uploaded to the Playstore. It's a simple book reading application which uses individual .png files as the pages to scroll between and I use a ViewPager to view them. I was unaware that Google had a limit on the app size that you can upload at 150mb. This is the error I am receiving
The original size of my drawables folder was 761mb. I have been able to convert it down significantly to 250mb however it is still 102mb over the limit. Minify is enabled. I have tried the Webp convert in Android Studio but it barely makes a difference. Using AAB also create more than a 10mb difference. Click for APK Aalyzer.
Anyone know anything else I can do? I've tried to convert over the images again but it doesn't make any difference to the size. I would want the images to be saved on the device rather than downloaded from the internet so that it can be viewed offline. I have looked into expansion apk's but all of the documentation points towards it only being saved in external storage.
Your solutions:
If you do not want to receive images from the server, try to reduce the size of your photos(compress) with the following two sites:
https://tinypng.com, https://tinyjpg.com
Convert your images to webp (in android studio right click on drawable image and click convert to webp)
Recommended use https://appicon.co/#image-sets to Get different sizes of your images ( mdpi, hdpi, xhdpi, xxhdpi , xxxhdpi )

how can some apps be small in size even though having lots of images?

I have an android app which is 35 MB in size. I am using around 50 images in that app because of that scrolling is not smooth and sometimes app crashes with errors like out of memory, whereas there are other apps which are using 100 images but are smaller in size, like 2 MB or so and these app work offline also.
I want to ask why these apps are small in size? are they using any library?
Try this it may work for you
convert all your jpeg ,png,etc etc images into " webp" it may take less space and
same quality of your picture...
https://developer.android.com/studio/write/convert-webp.html#convert_images_to_webp
Don't store all images in drawable rather make small json file and fetch all the data from your app so you can get a apk with smaller size and fast
some code is also their how to get data from offline also..
Try this:
1) Reduce Images size from this website.
Tiny PNG
TinyPNG uses smart lossy compression techniques to reduce the file
size of your PNG files
2) Put images in different drawable folder.
Using this website to generate different drawable:
https://romannurik.github.io/AndroidAssetStudio/icons-launcher.html
3) Use SVG or 9 patch if it is possible.

Android storing Media - web server

Issue: I want to upload a video or image with size >= 1MB to a web server and store it in a file but it takes about 2 mins to upload it. Any ideas about how to upload it in a shorter time?
I am using node.js as my server and the express-fileupload module to store the files.
According to my Knowledge there is no such module which can speed up the uploading in your case. As it all depends on several things like Your network speed, your server's traffic handling capability, etc.
But You can use Volley library that will handle to put your image and videos packets on the network channel as fast as possible other than that you can't do anything else.
Good Practice :
- Try to decrease your image size to some KBs.
Inspiration :
Instagram store 3 copies of images of 10 KB ,100KB and the real one. Try Image compression, that will help in speeding up uploading.
Just Coz I want to write more :
INSTAGRAM Downloading from server includes 3 Steps:
All 3 images starts downloading at the same time:
1). 10 KB the blurry image but not clear at all. Show it for few seconds to user. (Stretch to fit concept)
2). 100KB less blurry but more clear. Same show it for few seconds.
3). Real big size in MBs image now downloaded, show this beautiful image to user.

Reducing Size of Android Application with audio files

I have an android application where there are quite a number of audio files(.mp3 format) in the raw folder of resources.But the problem it creates is that the size of my app has become very large. What are the ways which I can use to reduce the size of app. Can't I compress that folder or use other technique ?
you can minimize the size of mp3 by changing its sample rate and frequency so it will reduce its size almost 70 to 80 % but still its sound quality is good to hear
you can get mp3 compression or mp3 size reducer open source software on google
click here for software compatible with window
once you reduce your size of mp3 automatically size of your app will get reduce
also delete the all unnecessary images ,stuff,xml ,java file from application so its size will definately get reduce
The only options I see are:
increase the compression of your mp3's
load the mp3's from a different source ( via APK Expansion Files or from webserver )

How to reduce my application size

I have an application 54 MB in size, of which 53 MB is an mp3 file in my res folder.
Due to the large application size , I am not able to run the application in the emulator. Getting error like "com.android.ddmlib.SyncException: No space left on device", "INSTALL_FAILED_CONTAINER_ERROR]", " the user data image is used by another emulator".
I increased the internal memory of my avd by setting "-partion-size 2047" and sometimes its running but most of time getting I'm getting the same problem.
Is it possible to reduce the mp3 file size?
Is there any another solution? please help.
What I see in many games to reduce the initial size is put all the "heavy" data outside the main apk and download it on the first run.
You have an example application of that here
How about having the application download the mp3 files to SD-card after the application have been installed?
Else, you could try and do some compression on the audio files.
Re-encoding the MP3 Files with a lower bitrate will reduce their size.
you should reduce the size of your MP3 file using a software like MP3 Resizer :downloadable here

Categories

Resources