App Memory Size?

jmeuse2

Member
Licensed User
Longtime User
I am venturing to create an ebook for android and so far I have 800 lines of code that add up to whopping 5Mb. Images and web pages account for an additional 2Mb. I say whopping because at this rate my program would become 250Mb+/- when completed. Multiplied by 20 other programs just like it, the entire suite would be 5Gb. My Samsung Rugby comes with a 4Gb SD card but can accomodate 32Gb. Unfortunately, many other phones have far less storage capacity. Perhaps I could trim some fat off but not in too many places.

The way I feel about it is if your phone can't handle it then you need a new phone or I'll have to charge extra in order to dumb it down for your Optimus V.

Is there a quick and easy way to reduce the amount of memory a program has short of deleting the file itself?
 

kickaha

Well-Known Member
Licensed User
Longtime User
That sounds a lot.

One of my programs is just under 900 lines, 5 activities, and the apk is 124K. What is making yours so big, do you habe a lot of files included.
 
Upvote 0

raytronixsystems

Active Member
Licensed User
Longtime User
Here's a couple of suggestions you might want to consider:

1. use data compression algorithms such as Zip and the like to squeeze your data down to a fraction of it's original size. I am not sure if zip is available in the b4a libraries up here but I'm sure someone here could help you out with that. Just perform a search on the keywords "compress". "compression", " zip", " unzip", etc. I have seen several unzip apps for Android so the code is out there somewhere, You could store your zipped data in a SQL database as BLOB data and uncompress indexed pieces of data as needed.

2. Host your data externally in the cloud in raw or compressed form to offload your app. You could easily maintain and distribute new content from your own web server. I would seriously consider storing it in compressed form to dramatically speed up download times.

Using either method above essentially turns your E-Book into a lean and mean data browser. Most modern software applications involving large amounts of data (e.g. pocket bibles and encyclopedia's) are using compression techniques and cloud-based data these days. You could present rich content with ease without worry about the lack of memory resources in the end-user hardware. There are lots of examples up here on how to access data from the web.

OK, hope this helps you more than confuses you. You app would probably have to be "dumbed down" from what it is today with additional code written to access the data using either of the methods above. In fact I have plans on writing a few apps in which I will host content in the cloud and will be in the same boat as you soon. The apps would pretty much all be the same but the unique content would define each app's functionality. All of my time would be in maintaining content and not in app coding itself.

Good luck and Merry Christmas to you and yours.

Regards,
Ray
 
Last edited:
Upvote 0

jmeuse2

Member
Licensed User
Longtime User
103kb -(29 html files)
1.82Mb -(20 images)
33kb -(Source Code)
2.09Mb -(temp.ap)
2.09Mb -(listview_DEBUG.apk)
475kb -(Misc. files)

Total = 6.7Mb
 
Upvote 0

jmeuse2

Member
Licensed User
Longtime User
Thanks Ray, Server offload (with compression techniques) is where this certainly gravitates towards when considering ebook functionality for cell phones. "lack of memory resources in end-user hardware" is a real concern.

I once encountered an impressive web based app that did perform significantly faster as you spoke of.

Most times downloading with this app was not painfully slow because it left the creation of navigation bars, buttons and other graphics up to the cell phone app but internet download time still varied depending on signal strength.

Nonetheless I'd give 4 (out of 5) stars for my overall user experience . Server offload may be a happier solution for this project in the end provided compressed text only web pages are what's being downloaded.
 
Upvote 0

kickaha

Well-Known Member
Licensed User
Longtime User
Am I missing something here?

The apk file is the one that is transferred to your device, and will include all your html files and images. So your total size is 2.09Mb.
 
Upvote 0

jmeuse2

Member
Licensed User
Longtime User
Thanks Kickaha, I didn't know which file or files comprised the actual program size.
If that's the case then my completed app size would be approximately 50Mb X 20 app's = 1Gb suite.

My business plan works like this, I want one million dollars so I can quit my job and lounge around the pool with sunscreen on my nose so what I need is for 10,000 people to give me $100 each. I know of 10,000 people who would easily pay $100 for these 20 apps.

The question is, can these 20 apps totaling 1Gb fit on everyone's phone.

No, but with server offload it will.
 
Upvote 0
Top