richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
07/12/14 02:26 AM (10 years ago)

Huge size of APK file

I was about to send my apk file to a friend when I realized how big is was (around 500 MB) so I resized all the PDFs and the total of the PDF's & png files is 34MB - still big but in comparison a drop in the ocean. So I exported my apk file to my desktop only to find that file is 186MB. Ok, it's seriously smaller than the original 500 but can this be correct? My app is small magazine (I have not even added the back copies yet) in comparison to say Vanity Fair but that app is only 14MB and the Times is around 20MB. What am I doing wrong?
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/12/14 04:06 AM (10 years ago)
I think there is a 50MB limit on apps... Which I consider huge, lol! But content is what it is. There are ways to compress PDF files, but I suspect some kind of cost (either resolution or quality) will come to bear... I'm probably not the best person to make comments on that... hopefully someone who publishes could weigh in on it. There is also the possibility of using an 'expansion' file... http://android-developers.blogspot.com/2012/03/android-apps-break-50mb-barrier.html Cheers! -- Smug Edit: I will say that, some of my maps of Guam can get pretty darn big; 30+ MB... again, I think it's huge. And maps are basically a collection of images of various zoom levels.
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
07/12/14 04:40 AM (10 years ago)
Thanks Smug, more reading :) I thought it was only Apple who produced thousands of pages on the same thing. I will look into the expansion files. Part of the reason might be that I have put all the PDF's and PNG files not only in BT docs but also in each of the 5 drawable folders. It's Saturday night so this will have to wait until morning but I think I am going to take them out of those files a bit at a time to see what effect that has on function and size. I only put them in those files because I read somewhere I was supposed to but maybe not.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/12/14 06:32 AM (10 years ago)
I have an idea that putting the pdf in 'any' drawable directory isn't going to matter. Take those out, leave the ones in the BT_Docs directory, and check your sizes again... should be an improvement. Cheers! -- Smug
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
07/12/14 08:05 AM (10 years ago)
Structure the app to download issues on-demand. For the back issues and current issue, you can the Use customURL or Smug's new PDF plugin for Android to reference external PDF files. The next time they want to re-read a particular issue, the PDF won't be re-downloaded because it is already in the App's cache. -- Niraj
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/12/14 08:36 AM (10 years ago)
Niraj: 'at the moment' my PDF plugin (for android only) accepts local files only. I 'will' be adding the functionality later, but it'll be about a week or so before I can get to it. Cheers! -- Smug
 
Dusko
Veteran developer
Profile
Posts: 998
Reg: Oct 13, 2012
Beograd
22,680
like
07/12/14 08:49 AM (10 years ago)
>but it'll be about a week or so before I can get to it Excellent! Looking forward to it!
 
richardemery839
Aspiring developer
Profile
Posts: 258
Reg: May 15, 2013
Bangkok
9,480
like
07/12/14 08:57 PM (10 years ago)
Well that did it. By taking the pdf's out of the drawable files the size is down to 48MB. Still big but under the magic 50. I can now test on a friends phone to see if all is ok.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.