Discussion:
Installing large .apk file to Android
(too old to reply)
Justin (Google Employee)
2008-10-23 17:54:51 UTC
Permalink
How large is your APK? In general, try to keep application files
around 1MB at most, and 2MB is really huge. There is *limited*
internal storage. If you have data files that are not going to be used
all the time, have your application download them the first time
they're needed rather than including them in the APK and if they're
not sensitive data, cache them on the SD card. Applications can not be
installed on the SD card, any data you want to write there, you'll
need to do yourself.

Remember, mobile networks are slow, and how many of your users with
want to wait for a 10MB application to download?

Cheers,
Justin
Hello All,
Looking for some recommendations on how to handle large .apk files on
Trying to write an application that will come with large amounts of
data and due to limitations on RAM, struggling finding a solution on
how to avoid INSUFFICIENT MEMORY problem when installing an app.
1) Is it possible to install an app solely on SD Card ?
2) Otherwise, packaging an actual app and its data in separate
packages will make installation a confusing for a user 2-step process.
Maybe it's possible to ship one zip file and make the android's
installer do the work of installing an app on the phone and app's data
on SD card ?
Any recommendations are really appreciated.
Thank you!
Timmah
2008-10-23 16:30:08 UTC
Permalink
Hello All,

Looking for some recommendations on how to handle large .apk files on
Android:

Trying to write an application that will come with large amounts of
data and due to limitations on RAM, struggling finding a solution on
how to avoid INSUFFICIENT MEMORY problem when installing an app.

1) Is it possible to install an app solely on SD Card ?

2) Otherwise, packaging an actual app and its data in separate
packages will make installation a confusing for a user 2-step process.
Maybe it's possible to ship one zip file and make the android's
installer do the work of installing an app on the phone and app's data
on SD card ?

Any recommendations are really appreciated.

Thank you!
Timmah
2008-10-24 15:39:35 UTC
Permalink
Definitely agree, however we want to enable offline installation. We
are dealing with heavy multimedia content which could take too long to
download from a phone. In this case, if I am a user, I need to first
download the app along with multimedia content --> install the
application --> from the installed application find the multimedia
content on sd card. Which is probably fine, however I hoped for an
easier, 1 step installation.

Thanks all for contributing!
2) Otherwise, packaging an actual app and its data in separate
packages will make installation a confusing for a user 2-step process.
Maybe it's possible to ship one zip file and make the android's
installer do the work of installing an app on the phone and app's data
on SD card ?
Why not have the application lazy-fetch the data off the Internet when
it is first run?
--
Mark Murphy (a Commons Guy)http://commonsware.com
Android Training on the Ranch! -- Mar 16-20, 2009http://www.bignerdranch.com/schedule.shtml
Ludwig
2008-10-24 16:14:50 UTC
Permalink
Just as a caveat when dealing with large resources.
I tried to pack a rather large XML resource file with one of my
applications, for which I planned to open a pull parser to then put it into
a DB. Inside the apk the xml file is compressed, but when (implicitly)
uncompressing it for parsing, the process failed because the uncompressed
resource was too large. Chopping the resource into several XML files helped
to overcome this problem and the database is quite responsive (the DB size
after cutting down is now about 500KB, so not too big).

As it was pointed out to me there is only 128MB user space on the G1, so
putting lots of multimedia content onto the built-in memory is also not a
good idea.

I do support the motion that applications should be installable, or part
installable, onto the SD card, e.g. in the form of pre-packaged databases
(or some such) as additional resources. That would for many developers solve
the problem of how to implement lazy-fetching. Not all data resides on the
internet...

Ludwig
Post by Timmah
Definitely agree, however we want to enable offline installation. We
are dealing with heavy multimedia content which could take too long to
download from a phone. In this case, if I am a user, I need to first
download the app along with multimedia content --> install the
application --> from the installed application find the multimedia
content on sd card. Which is probably fine, however I hoped for an
easier, 1 step installation.
Thanks all for contributing!
2) Otherwise, packaging an actual app and its data in separate
packages will make installation a confusing for a user 2-step process.
Maybe it's possible to ship one zip file and make the android's
installer do the work of installing an app on the phone and app's data
on SD card ?
Why not have the application lazy-fetch the data off the Internet when
it is first run?
--
Mark Murphy (a Commons Guy)http://commonsware.com
Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-***@googlegroups.com
To unsubscribe from this group, send email to
android-developers-***@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---
Steve Oldmeadow
2008-10-24 00:14:54 UTC
Permalink
Post by Justin (Google Employee)
Remember, mobile networks are slow, and how many of your users with
want to wait for a 10MB application to download?
Based on the iPhone App Store's sales lots of people want apps greater
than 10Mb - as an example Spore Origins is 80Mb. Apple's approach of
forcing > 10 Mb downloads to be done over WiFi seems reasonable to
me. The bulk of these big games is media assets like music and video
so downloading those assets and storing them on the SD card is
feasible, however, I'd like to see Android offer better support for
this. For example allow an associated directory to be established on
the SD card so that when the user deletes or backs up the application
the associated directory on the SD card is also deleted or backed up.
Timmah
2008-10-24 15:31:49 UTC
Permalink
Hi Justin,

Thanks for your suggestions. We are definitely trying to keep the
application size as small as possible, however our application would
come with a large amount of media data. We are trying to write an app
which will show the users instructional photos/videos and have no
choice but to pack it separately from the app. Also, one of the most
important concerns is to have a working application even when NO
internet connection is available, which requires preloading the phone
with the required data on sd card. Our biggest concern in this case is
how to make the installation process as easy as possible. We were
originally thinking of letting a user to download a zip file
containing the .apk + photo/video data, but struggling how to walk the
user through the installation process, so it is not very confusing.

Thanks again for helping out !

Tim
Post by Justin (Google Employee)
How large is your APK? In general, try to keep application files
around 1MB at most, and 2MB is really huge. There is *limited*
internal storage. If you have data files that are not going to be used
all the time, have your application download them the first time
they're needed rather than including them in the APK and if they're
not sensitive data, cache them on the SD card. Applications can not be
installed on the SD card, any data you want to write there, you'll
need to do yourself.
Remember, mobile networks are slow, and how many of your users with
want to wait for a 10MB application to download?
Cheers,
Justin
Hello All,
Looking for some recommendations on how to handle large .apk files on
Trying to write an application that will come with large amounts of
data and due to limitations on RAM, struggling finding a solution on
how to avoid INSUFFICIENT MEMORY problem when installing an app.
1) Is it possible to install an app solely on SD Card ?
2) Otherwise, packaging an actual app and its data in separate
packages will make installation a confusing for a user 2-step process.
Maybe it's possible to ship one zip file and make the android's
installer do the work of installing an app on the phone and app's data
on SD card ?
Any recommendations are really appreciated.
Thank you!
Jon_Roland
2008-11-09 01:59:26 UTC
Permalink
Let's consider particular apps we want to be able to install. Here is
my short list:
1. Garmin Navigator, currently only for Windows, with functions that
are presently not supported on the Maps app that comes with the G1. On
my T-Mobile Wing it installs, with data, on the SD card. It doesn't
have much RAM, so how is it done on that platform? What would it take
to duplicate it on the G1 (leaving aside the port from Windows to
Linux).?
2. A decent word processor + spreadsheet app. Preferably
openoffice.org, although that is huge. I could get along with Kword
and Kspread for a while, or even a good text editor like Kate.
3. An Exchange equivalent, perhaps OpenExchange.
4. A package manager, like Synaptic.
5. A good web editor, such as Quanta Plus.
6. An FTP tool, like gFTP.
7. A terminal console with shell access.
8. A PDF viewer.
9. An accounting app, like Gnucash.
10. A task manager/planner linked to calendar, email, etc.
11. A scientifuic calculator comparable to the TI-89.
12. An encryption manager, PGP.

Given the limited RAM and system memory, it would seem that that
should be largely confined to the launchers and their icons, with
everything else residing on the SD.

Continue reading on narkive:
Loading...