How to use 100's of different .gif images in Android Studio - android

I've 100's of .gif images to be used in a android application that I'm trying to build. Can any one suggest me how should I minimize their size. And should I place them in drawable directory.

Google play has a limit on APK size which can be uploaded to playstore(if I am not wrong its 100Mb), so having so many .gif files inside application drawable folder will not be a solution.
Best solution I could think of right now is via Dynamic asset delivery by google play.
Please go through below for more info on asset delivery
https://developer.android.com/guide/app-bundle/asset-delivery

Related

How to add resourse folder to the expansion file

I am new in this question. So my app have drawable folder with many images (more than 100mb). If I try to create and upload this app, playmarket will not allow me to do this. I want to add images to the expansion file (to reduce app size). As I understood I have to pack these images into .zip file and name it like main.1.my.package.name.zip
Then I have to upload app without images to playmarket and then upload these images inside .zip file. But how can I separate drawable images from my app?? I have many references (like R.drawable.image) inside an app. Android Studio simply will not allow me to build apk without these images.
May be I don't understand the simplest things.. Please tell me where I'm incorrect. It would be great if someone share his experience of creating expansion files.
All you need to do is create a new folder at the same level as your "main" directory and name it as you please. In this new folder you will need to copy the structure and use the same name for the drawables you want to override.

How to supply images with Android application

I need to make an application, which will be a gallery of several pictures, supplied with the application when downloading app from Play store.
Could you suggest how this is best done in the future to facilitate the addition of new images?
I know how to do to gallery took the images from a folder on your device, but how to put these images together with the application from Play Store? We need them as a resource to unpack?
Thank you!
You have 2 basic options.
Download images from internet on runtime - supplied by your server which you can control and therefore add new images without the need of updating the application.
Or you can just put images into your /drawable folder within app and every time you add new image there you update your app on play store.
if you put all the image in the drawable folder then the application is going to be very big. I would suggest putting the images on a image hosting cdn like cloudinary then use an image downloader to pick the images from the url and cache them on the device like Picasso or Universal Image Loader. Also you dont want to be shipping updates just because you want to add a few images.
I think there are 2 ways to do it:
(1) Put the pictures to web server. The apps can download the new picture from web server and store to device's local memory.
(2) Put the images to /Asset folder and submit app update to Google Play when you want to add more pictures to the Apps.
I'm not sure what you mean as a resource to unpack, but the simplest option is to include them as drawables.
If you do not want to do that, you can include them in the assets or raw resources directories. Assets is often used for some images raw might be used if you were for instance including some other format to unpack as you said, bit that comes with its own issues.

what font within Android is closest to this image?

I have seen the below font used within several android applications, including Clean Master etc. What free font is closest to this image and how can I make use of it within Android? Thanks
The closest (most similar) font I could find was: Roboto
I dnt know what 'Clean Master' app you have there cause on play store there are tons of apps named so .Maybe you give me exact package name .And I can tell you what font they use.
Any way the idea is you to download the apk file from play store and open it with winrar or something and look into the assets folder , cause there ppls put the fonts most of the times and then they load fonts in app.
You can use this link to download apk's from google play.
http://apps.evozi.com/apk-downloader/?id=com.cleanmaster.mguard
I just downlaoded this and I see in apk's asset folder 6 font files. You can download yourself and see it
*UPDATE
They use this fonts in the apk : Spoon Number , Icomoon and Miso Unit .
you can download them from the link i give you
The font on the right of the image is likely to be Roboto but the large numbers are not. Have you tried using an identification tool such as: https://www.myfonts.com/WhatTheFont/ which allows you to upload an image. Failing that you could chance your luck emailing the developer of the app where you have seen it used.

Reduce apk size

I am developing an android application in which there are hundreds of high quality images(512x512px to 1000x1000 px and above) and hence the apk size has become too (more than 400mb) large. So, is there a way to compress my .png images or any other way to reduce the app size. I also read about proguard but will it delete my images?
Thanks in advance!
An APK with 400 MB is really huge, so you need to compress images, use these links to compress http://www.tinypng.com http://www.compresspng.com http://www.punypng.com You could also choose to load the images from server and store it in sdcard on application launch. So your application doesn't need to store images inside itself. I recommend you to store & load images from server.
You could try to use something like pngcrush, to reduce their file size, or you can try to store them remotely on a server and pull them down to the device on demand and cache them (it's likely that you don't need all the images at the same time)
How to reduce apk size-
Image Compression
Pre-process images-Manually optimize images in res folder using external tools, and set cruncherEnabled to false to keep optimization.
Pre-process .PNG using zopflipng.
In android version above 4.0 WEBP images can be used.
For icons vector drawables is better option.
Code Compression
-Use proguard to compress the bytecode in raw apk file.ClassyShark is apk explorer tool allow to look into dex files
Remove resources using resConfigs.
Set shrinkResource true in build.gradle file to remove unnecessary resources left by proguard.
ArscBlamer is tool to compress strings.(For apps which have multiple string folder for multiple android versions)
for more info about apk size visit this link
As stated in earlier answers there are ways to compress images, but these will not take you too far. You need to change you app to dynamically download images. To save space on the user's device, you should probably let users pick which images or groups of images they want to download, instead of downloading all images.

Separating images from the apk file in android

I am writing an android application which has a lot of images in it.
I do not want to keep these images as a part of my apk file because that will make the size of the apk file very huge.
I have written the application in a way that it loads these images at runtime from the sdcard from some predefined location. Now my problem is that how do i provide these images to the user who wants to install my application. Since the images are not a part of the project (i.e. not present in any of the drawable folders) so they will not be a part of the APK file that i provide.
Is it even possible to do such a thing in Android? Or can someone suggest a better solution that i have right now. Any help is greatly appreciated.
There is an official way to achieve what you want: APK Expansion Files

Categories

Resources