what is a suitable upper limit for application size?

by Dan Sherman » Fri, 08 Jan 2010 11:00:03 GMT


Sponsored Links
 I've filed a bug report against it, but not sure if its been address in
later releases.

At the time of 1.5 and 1.6, the package installer requires 4x the package
size to be available during an install.

That means, for a 15mb package, the user will need 60mb of free space, or
else the install will fail (adb installs bypass this requirement).  The
error message is also unhelpful: "Installation Failed".

Considering G1's only have 64mb, you're in a rough spot.  We've had a ton of
user complaints with our apps that are around 5.5mb.




>



what is a suitable upper limit for application size?

by ian » Fri, 08 Jan 2010 12:53:39 GMT


 I meant to reply to the public board.

As I was saying, doesn't this application size limit pose a barrier to
apps which use sound or video clips? Although my app has lots of pics
(250), they don't amount to much really, being only 300x400.each..So
this must be a problem for many apps.

I suppose the capacity is greater on a Droid or Nexus??

I  have never seen an Android phone in Canada yet so I don;t care so
much about G1s. Up here in Canada, the first generation of HTC Android
phones are very rare, having been offered so far only with a dreary 3-
year package. People are waiting for a better deal, or choosing
another brand.

My hunch is that Pre is way outselling Android in Canada so far, maybe
5 to 1. When the Droids are released in a month, I expect that all to
change.








> >


Sponsored Links


what is a suitable upper limit for application size?

by Nanard » Fri, 08 Jan 2010 18:04:44 GMT


 Hi,

I agree about the size limit problem.  I think there should be a size
limit (to keep RAM for OS & other app), but we should be able to check
in our code if we are 'near' the allocation limit for our app.

Anyway, for your case : would it be possible to REMOVE all images from
the .apk, and download them in a thread once your app is launched
(OK : keep icons in the .apk).  You can use the 8Go of the SDCARD to
store your images :-)  and load them in RAM only when you need to
display



what is a suitable upper limit for application size?

by ian » Fri, 08 Jan 2010 22:43:54 GMT


 Thanks for the interesting suggestion, although it sounds a little
technical for my limited expertise.

I don't like the idea of the users having to download all that data
every time they use my program. That basically turns the app into just
a web site, sort of.

I could probably shrink it all from 15 to 5MB with only a minor loss
of quality and content.

If this limit is only a problem with 1.5 and 1.6 , and the first
Android phones in Canada are Droids, then I suppose I just have to
upgrade my program to 2.0 and hope nothing breaks.









> display



what is a suitable upper limit for application size?

by C茅dric Berger » Fri, 08 Jan 2010 23:29:09 GMT


 


A lot of android apps use this technique : download images to SD card on
first run (in fact if it detects data is not there on the card). You get a
popup asking if ok to download. This is a one time download, not every time
you use the app.
Even in android platform, text to speech data has to be downloaded before it
can be used (depending on the phones... this is true for space limited G1,
and also for my french Magic).

Anyway, I consider application using more than 3MB as big ones, and more
than 5MB as very big ones. 15MB is a no-go, even if it worked ok at download
time from market.
And this is with a HTC Magic. G1 users with half the internal memory would
be even more reluctent to install such big apps.

Future android release  will allow installation of apps on sdcard (2.1 does
not), which could allow bigger apks....

Also note that having separated apk and data allows upgrade of one whithout
re-downloading the other. Else, any upgrade of your app, even minor, would
imply the re-download of 15MB from market.



what is a suitable upper limit for application size?

by Kaj Bjurman » Fri, 08 Jan 2010 23:48:45 GMT


 25% Don't you think that that is too much? Most users install more
than 4-5 applications. I would never ever install an application that
is that large.

I do however agree with the others who says that it's ok if you
download the images dynamically, and stores it on the sdcard. That's
how my application handles different skins.




> use up more than perhaps 25% of a user's discretionary storage?



what is a suitable upper limit for application size?

by ian » Sat, 09 Jan 2010 02:02:42 GMT


 Well that idea of downloading of data onto the SD card does sound like
the proper route to take.  If it didn't happen every start-up then it
isn't much of a problem at all.

I'll sort out the details and take that good advice. Thanks for the
help folks.

- Ian






> imply the re-download of 15MB from market.



what is a suitable upper limit for application size?

by Jack.Chu » Sat, 09 Jan 2010 03:15:51 GMT


 apps more than 1MB is relatively very large on android. Maybe you can
work around by put something on sd card.



> use up more than perhaps 25% of a user's discretionary storage?



what is a suitable upper limit for application size?

by jotobjects » Sat, 09 Jan 2010 03:32:17 GMT


 


This link says G1 has 192 MB  RAM an 256 ROM (ROM used for what?).
Seems like it is not easy to find that memory statistic even on the
manufacturer web sites.  Also there have been messages about how much
RAM is really available since the OS takes a significant chunk.  Where
is a good place to find these numbers?

 http://www.androphones.com/all-android-phones.php 



what is a suitable upper limit for application size?

by Dan Sherman » Sat, 09 Jan 2010 03:47:19 GMT


 Correct, they have 192mb RAM.  However, a good chunk of that is partitioned
away as OS space, etc.

The data partition is 76mb (I incorrectly said 64mb).  Here's a breakdown of
those partitions:
 http://androidandme.com/2009/08/news/the-g1-storage-problem-in-charts-and-numbers/ 

- Dan





>



Other Threads

1. How can I stop File write operation when sdcard is going to be umounted

Hi,
In my app, I need to do some file writing operations, such as saving
bitmap
to sdcard file:
OutputStream fos = new FileOutputStream(new File("name"));
bitmap.compress(Bitmap.CompressFormat.PNG, 0, fos);
and it is implemented in a separate thread.

I interrupt the thread by calling Thread.interrupt() when unmounting
SD card,
and receives the following log:
E/vold    ( 1132): Killing process 7646
E/vold    ( 1132): process com.android.video (8654) has open file /
sdcard/Android/data/com.android.video/cache/
_sdcard_video_video-2010-05-09-00-47-07.3gp.png

It seems that I didn't close the thumbnail cache file, and it results
in my process being killed.

So my question is how can I stop File write operation before interrupt
the thread?
The android document says that using InterruptibleChannel can cause
ClosedByInterruptException,
so I tried to use:
OutputStream fos = Channels.newOutputStream(new FileOutputStream(new
File(cachePath)).getChannel());
[ see http://forward.com.au/javaProgramming/HowToStopAThread.html ]

but it just didn't work, since no ClosedByInterruptException could be
caught...

So how can I close the open file before umounting SD card ?
I think It's really very common.

-- 

2. layar's platform

hi all,

layar has this "platform" line-like image (See photo
http://lifehacker.com/5357691/layar-brings-semi+augmented-reality-to-your-android-phone)
that will adjust as the pitch of the phone increase or decrease.

how do i create that image so that i can put on the camera overlay.
How do i make it "tilt" as the sensor data changes? i know how to
shift images on camera overlay but really have no idea how to start
with this.

can someone advise me?

thanks
bryan

-- 

3. how to create a semi transparent image for the camera overlay?

4. Place two buttons side by side

5. SSL client authenticatio

6. How to abort slow array sorting

7. Turning off Android notifications.(Battery/Bluetooth)