how drawables resources stored on device - android

guys, I wonder if you put images for each density type (low/medium/high) and there are quite a few of them, won't it increase the size of application footprint on internal memory?
I would hope that android will put only needed resource file from apk to the actual application folder. Can somebody confirm that?

It will increase the size of the .apk, because those images need to be in the .apk. It will not increase the RAM footprint of the app at runtime. When an app is installed it is kept as its original .apk, so the storage space needed will be basically the size of your .apk.

Related

To decrease the ANDROID13(AOSP) .img memory sizes

I have cloned the AOSP master source code and compiled it. All required .img files are generated in the OUT directory and the size of the overall image is 14.1GB.
Now I am trying to decrease the .img files to as much as possible.
Removed preinstalled apps, but not getting much effect on the sizes.
Can you please suggest/clue me, which is the better way to decrease the image size?
Note: My target device's memory size is too small(Less than 4GB) because of this I am trying to discrete the memory size. I just need to flash android not required all features like AB OTA, BT, camera, etc...

How much memory does a PNG image take up?

In my app, I am going to have 750 PNG images in my drawable folder. I am getting these images by taking screenshots from my computer.
When I built my app with all of the images, the app's file size was 140MB. Then, When I removed all of the images and rebuilt it, it went down to 2.75 MB.
Is there any way to reduce the amount of memory the PNG images take up? Would reducing the size of my screenshot be an effective solution?
I am going to have 750 PNG images in my drawable folder
Most likely, that is not what you want. res/drawable/ is a synonym for res/drawable-mdpi/. Your image will be resampled to match the density of the device, potentially taking up a lot more heap space. Usually, something like screenshots go in res/drawable-nodpi/, to indicate that the images should not be resampled based on density.
When I built my app with all of the images, the app's memory was 140MB. Then, When I removed all of the images and rebuilt it, it went down to 2.75 MB.
I am going to interpret this as meaning the size of the APK, which in turn controls the starting amount of disk space associated with your app. Please understand that Android does not have an "Application Manager", even though your specific device might have such an app.
Is there any way to reduce the amount of memory the PNG images take up? Would reducing the size of my screenshot be an effective solution?
If by "size" you mean "resolution", then that will reduce the file sizes of the PNG files and should reduce the file size of your APK.
As a now-deleted answer points out, you can also reduce the file size of the PNG files using tools like pngquant, that optimize the PNG in ways that your screenshot tool perhaps did not.
And, you can reduce the size of your APK by reducing the number of screenshots. How many of your users are really going to look at 750 screenshots? You might consider packaging a subset of those with the app, downloading additional ones as needed from some server.

Regarding memory size of android application

Hei, I had developed an android application by using phone-gap framework. The memory size of .apk file is 350 kb. After installation, the usage of memory by the application is 2.00 mb. I want to reduce the usage of memory after installation,actually that is the requirement. On surfing Google, I worked on Images and images are of required pixels only. Is there any alternative to reduce the memory size of application .... thanks in advance.
Your project may have files that were compressed while generating apk file for you. These files are decompressed when you install the application.
Try to reduce the size of the files in your source code.

How to make android apps of low size?

I was doing a little project thing for my school...
I made a simple calculator app...with simple mathematics operations...
And when the apk file is created and installed, it was consuming the memory space of more than 700 kb in the phone.
While in the android market(play store), there are just similar apps which are of low sizes and are taking memory space of less than 500. I was creating app in eclipse...
Will somebody plz help me out with this that how they do make apps of simple lower size.??
The smallest APK I created is ~35kB. Size increases dramatically with the included assets. Check the size of your /res, /assets and, if you have it, /raw folders. The APK size will be larger than those three combined. Further, any included lib counts, and adds bulk, even (and especially) the compatibility library, if you use it.
If you're having lot of graphic assets, then you should probably look at using 9-patches. They save a lot of memory.
Please elaborate your question. When you say memory, are you referring to the RAM OR the actual storage memory ?
If you are referring to storage memory...
The storage memory depends on how big your application is. For e.g. IF you have too many images of large size, then app size will increase.
By the way, 700K is not really too much. You are OK.

App size is significally bigger than expected?

I have almost finished writing my app, and i am concerned about the app size. Besides the 876KB res folder and the 1,08 MB assets, the rest of the files in the project are just source code in src (the src is about 80KB). The app can download a ~160KB file from the web. From the app info (in the app settings), says the following:
Total ............5.89MB
App ..............1.79MB
USB Storage app.. 4.09MB
Data ............12.00KB
SD Card.......... 0.00 B
The app is saved on the SD card.
The question is, is there a way to reduce that size? I have already compressed the images I am using and it seems really weird to me that with the size of the folders in the project, the app needs 6 MB of space.
Also, how come the app size is bigger when the app is in the SD card?
Consider using proguard here in your app. With latest tools, proguard is on by default.
Also, do not consider the size of app until you have obfuscated it.
ActionBarSherlock adds about 200KB to your apk size not MBs.

Categories

Resources