App Size Still same After delete Captured Images - android

I am working on android app which capture Images and send it to server when internet available then delete these images
every thing works fine but when when capture image app size increase and when delete it app size still same
to understand me
suppose that app size when install it is 9MB
then I capture Image with size 5MB
then app size Increase to 14MB
then delete Image
then app Size should be 9MB Again
but that not happened it still 14
and when take another image size increase and increase ..
Any Help How to maintain app Size ?

You should delete cache files ..
Because if you're uploading to server , then you must delete the catch file also along with the original file .
Please check the below link , for how to clean cache files .
Clear Cache in Android Application programmatically

Related

Image size changes on when you shift it on Android phone or Emulator

I am working on something which includes image upload loading. User can set the image or document size in bytes from the web end and then user can upload any image or document up to that particular size.
For testing purpose I have set the limit "39000" bytes on web end and downloaded a sample image from internet size 39kb(39000) on my Android phone , Emulator and on system (Windows).
When I upload that image from web it gets successfully uploaded but from Android Mobile and Emulator I get the error that image size limit is exceed.
I have checked image details on all the platform. I don't understand when the image of 39Kb is downloaded on emulator or on android device why its size gets increased.
I am attaching the screenshot sizes along with the link of image.
https://sample-videos.com/download-sample-jpg-image.php

why some photos are not working in my android application

I am trying to set one photo as my activity background, but it is not working and i got a message
"unfortunately, application has stopped"
when some other photos are working absolutely fine.
mmmm this happens when the image size is much bigger to handle ina ndroid application, it's allocating free memory to application when starting.if the image size pixel and capacity get bigger it creating this kind of errors. you can use lower size of image to get rid of this.
or
use Picasso lib to set backgrounds when use high res or big capacity images

Can't save images on internal memory android lollipop

I'm having problem saving jpg and png images on internal memory on Android Lollipop. I'm using a simple application that download (directly or asynchronously) an image from URL an show it on imageview and than it's possible to save it in the internal memory previous create an album on image gallery. The problem is that download the image, after it show it inside imageview but it does not save in the internal memory. It show that it save a file with the right name inside the new album but the file has 0.00 bytes. The app work fine in kit kat. I'm trying with this sample because I'm running the same problem in another app that, as the sample do, works fine in kit kat and does not in lollipop.

Android - why isn't bitmap loading time much shorter when image is smaller and more compressed?

I'm making an app for android. I use images as screen background.
Time of setting 1848x1080 jpg in imageView is about 65-80ms on my phone. File size is 900kb.
When I reduce image's quality and size (1369x800), the size of file is about 150kb.
But time of loading that image is about 55-60ms! Not much of a difference.
Why is that? Can anyone help me with this - how to prepare images well to be loaded as quickly as possible in android and still look well on Full HD screen?
That is because Android as an operating system has to create an internal file descriptor in each case. That takes always the same time, so you don't win anything if the file size changes.
I would recommend you to preload the files you quickly need and hold them in the memory (caching). This will maybe blow up the memory used by your app, but it will allow you to display those images really fast.

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