Massive storage on android devices - android

I am using Icenium to build an application using map services, localisation services and more. I just realised that android-devices stores massive ammounts of pictures in the phones image-gallery. The application is build to look good on any device, therefore, all icons (and some images) come in 4 different sizes (high definition, low definition etc).
So when I start the application on a android-device, the image gallery instantly gets ALL the images that can be used with the app (around 600 small icons + some images).
This is a huge problem, and I havent really found a way to solve this. Is it a built in "feature" of icenium or is it a bug?
edit* Images/icons are fetched from a server at launch, so we do not want them to store locally..
Thanks!
//Joakim

As per the Icenium guys (check out this forum http://www.icenium.com/resources/forums/android-devices-/app-icons-and-images-displayed-in-gallery#a8qHkcQkbkiGelukQjTr6g), this is only true when your application is build in Debug, because in this case your app is on the SD card. Once the application is built in Release you should not see the app images in the gallery as it would be sandboxed (not on SD).

Related

App install size the same on different device types

When I install my app on my main/new phone, the installed size is around 18.5MB
and when I install my app on an old Samsung Galaxy Ace (Mk1), for some reason, it installs with pretty much the same size, as you see here:
It runs perfectly on my main phone, but obviously, the old Galaxy Ace really struggles with it.
Now, I download a random game from the Play Store and with that one you can see the results here:
Much better, it takes up less space on the less capable phone than it does on the more capable phone.
However, my question is, where can I start to try to figure out why my app doesn't exhibit this desired behaviour?
Information about my project
I have provided 4 sets of Graphics within my project and they are:
Graphics
XHDPI: Total of 3.73MB
HDPI: Total of 2.87MB
MDPI: Total of 1.33MB
LDPI: Total of 1.03MB
Sound
OGG Sound Files: 202KB
MP3 Soundtrack: 5.6MB
The (Unsigned and signed) APK file is about 16.02MB
Apart from that there is a classes.dex file within the APK which is about 3.5MB.
In Eclipse, I link BaseGameUtils and Google-play-service-lib jar files.
I know that my game is slightly more resource hungry than the other game I downloaded - but that isn't the point of this question. I need to make sure that the size of the installed app is smaller on lesser capable phones than it is 'better' ones but as you can see, mine is exactly the same.
Any help would be appreciated.
Edit
Additional information if it helps:
The Samsung Galaxy Ace is running Android 2.3.4 Gingerbread
The other phone is running Android 4.4.2 Kit Kat
the answer is the picture.. you see android apps can specify locations where apps are supposed to be installed, whether internal or external- you can do that in your android manifest file
android:installLocation="auto"
Looking at your app you from the settings screenshot you have not specified that element in your manifest hence the "move_to_sdCard button" is inactive. Your apps installs in internal memory
coming to the other app, looking at the screenshot you will see that the "move_to_phone button" is active because they specified that feature hence since there wasn't enough space on your device it automatically installed your app on the internal-external memory or strictly external memory.. But when that feature is set not all resources or files are installed on the internal-external memory they are shared, so the size gets trimmed in the process hence that ouput.
Speaking about the lag of your app, you need to digg into your codes pretty much. also newer apis contain functions the old ones do not have, hence you need to re-evaluate the kinds of codes you choose..
Hope i am lucid enough
Probably the "Other App" is using the Multiple APK technique to publish the App on the Play Store. With this feature you can build and deploy several apk(s) each targeting a specific device density screen. In this way you can reduce the apk dimension since each apk will have only the resources for his target and automatically the Play Store will deliver the correct one.

memory/ ram app issues

My app is a quiz that has an imageview that switches images (20) based on the question and each image is a 720*540 jpeg referenced from drawable resource. I also have a gallery of all the images that the user can scroll between. I have noticed that my app must be using alot of ram because after closing my app and using other apps on my phone my launcher, htc sense, almost always crashes. I don't have this issue if my app isnt installed or used. I know android kills low priority apps to free up ram so I am guessing that my app is using so much ram that my launcher keeps getting killed. Is there a way to clear the ram my app is using when it closes? or something I should be doing such as deleting the images from memory after they are used? I am rather new to android development and still learning everything.
This is most likely either a memory leak or that you are not properly handling your images. Please look into using a library like https://github.com/nostra13/Android-Universal-Image-Loader which will ensure that your app is scaling down images for display

App Inventor cannot connect to phone or emulator

I've created a screen with a lot of pictures (75 pictures), which are not visible. Since I've added the last 50 pictures, the Blocks Editor cannot connect to the phone or emulator anymore. I really need all of the pictures for my app. Is it possible, that 75 pictures in one Screen are too much?
I also can't download the app to my computer at the moment, because the build server is currently busy :-/
How large are your pictures?
Are you aware, that there is a 5 MB limit for App Inventor apps?
There are the following workarounds
1. Hossein's solution
2. Shival Wolf's webprefetch or Taifun's webprefetch file by file
3. Gary's solution

App file size differences in Android and iOS

Working with both app distributions services (android market and Apple App store) I have discovered a mystery.
The file size of an app is in general larger for an Apple app than for a Android app.
I can't seem to find any explanation for the differences, and it seems to be an untouched subject.
I have tried allot of different apps and the difference seems to vary between a couple of MB to 6-8 MB. So the question is, how come the file size is larger for Apple apps? What is the extra MB used for?
Examples:
BBC:
Android: 918K - https://market.android.com/details?id=bbc.mobile.news.ww
Apple: 6.7 MB - http://itunes.apple.com/dk/app/bbc-news/id364147881?mt=8
Due to some spam prevention, I'm unable to link directly to the rest.
British Airways
Android: 1.2 MB
Apple: 7.9 MB
Northern Bank
Android: 2.1 MB
Apple: 6.4 MB
Bank of America
Android: 727K
Apple: 2.1 MB
I could go on... If anyone can provide a statistics of file size for the two app distributions, confirming or disproving my theory. - I would appreciate it allot.
I have just spent the last day or so trying to track this exact problem down. I have built a little game called BlockIT for Android, and now I have a running version for iOS. The extremely odd thing is that the Android version is 8.2 MB and the iOS version is 14.1 MB.
Now, since I am the owner of the source, I wanted to track this down and find out why. As many suggest here that it is the graphical elements - this is not the case. The entire data set (non code) was almost identical in each package. Which makes sense since I am using the same graphics in each application.
So, why is the code build so much different! My iOS code build was nearly 7 MB and the Android one was less than 3 MB. The code itself was written to run identically and all but small portions of code are exactly the same on each platform. What I found was that the build (iOS gcc) settings had massive effects on what size of output you get. If you set only to target ARM6 or ARM7 then the size of my code binary dropped from 7 MB to 5 MB. This indicates there are almost complete duplicates of functions and libraries for each target in the one binary! Additionally, the built-in debugging symbols dont seem to get entirely stripped. Finally, the encryption of the code also costs large amounts. This is probably the most puzzling, since Android signs their apk's in a similar fashion. It seems that the iOS signing is done very oddly.
So, I hope that helps. To reiterate:
- Images / Data don't seem to be the problem
- Code building on iOS generates multiple platform output in the one binary == lots of extra code (btw I dont wee why Apple does this - seems odd).
- Code encryption is not very size friendly on iOS.
There's no real way to fix the actual problem (again, odd and disappointing).
The binary executable in an iOS app is encrypted, and thus compresses very poorly or not at all. The binary executable in an iOS app is compiled with some library code statically linked, which can often make it larger than interpreted Dalvik byte code for similar stuff. iPhone apps tend to contain more high quality graphics content and artwork for multiple screen resolutions including the relatively large iPad display.
For a universal app in iPhone we need to put three size of images -
one for 320x480 px
second for 640x940 px (retina)
third for 768x1024 (iPad)
where as while developing a android application we need to put three kind of images -
hdpi (high)
mdpi (medium)
ldpi (low)
one more thing here in android there is no compulsory rule to put all three kind of images. Basically it depends on for which target you are making app , only for those resolution we need to put images.
In my opinion, Apple Developers are using more full-screen size Images (in low def and Retina), and much more images than Android, and UI definitions files for iPhone (.XIB) are much bigger than XML files used in Android. There also should be a difference of Compression in packaging (.APK) is so hugely compressed ! And Finally maybe a difference in Including frameworks, but on this point I have no clue :)

we have Android Application Size more than max Size?

What should we do if the size of our Android application is more than max size? Currently the acceptable size for Android applications (i.e. <App>.apk) on the Android market is 50 MB.
If our <Application>.apk size is more than 50 MB then what's the alternative to follow on?
Try removing the resources from the project and changing the app so that the resources will be downloaded upon first app opening to the SD card...
It will take some time to develop the changes, but I don't think you really have a choice...
Note that Samsung devices have an even smaller size limit...
The first reason for .apk size growth is resources. The more specialized application gets on each configuration (screen sizes, orientations, densitites etc) the more .apk size grows. Usually .apk still has size much less then 50 mb limits, but even with 20mb users may perceive your application as heavy.
Android Market added support for multiple .apk per application. This feature was designed to specifically address the issue of .apk size growth due to many different configuration. You can read more about it in Multiple APK Support in Android Market post from official Android blog. Though this is considered as last resort.
If you .apk size is large due to other reasons, then you're most likely doing something wrong. If its some embedded video/audio file (or even files!), consider moving them to web and download when user needs them for the first time. This will save internal memory space which is might be critical to users (especially on older devices).
I can't image why an application would be more than 50 mb from just the source code alone. If alot of the size is in design elements(images, etc) or data(database files), you could always have the user download this info when the application is first run.
if you are using Android 2.3.3 version then minimum size of the application must be minimum 9MB and maximum size is depend upon the device,the capacity of memory of the device. but if you take it 50 MB then no problem, its disadvantage is only that the AVD takes time to start.i don't know the Android Market place current application size.

Categories

Resources