size of viewlib and app APK -- how to reduce - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1
  • 2

TOPIC: size of viewlib and app APK -- how to reduce

size of viewlib and app APK -- how to reduce 3 years 5 months ago #9007

  • swarrenvcc
  • swarrenvcc's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
We have implemented version 3.4 of your PDF reader for Android. It's working great, but we have a couple of questions about reducing the size of ViewLib. Our app has grown from 8 to 17 megs with the addition of the new Mobi reader.

We would remove the extra shared objects for CPUs we don't use, but in the future we may need this. We are unable to remove these shared objects, and they contribute greatly to the extra size of the APK.

We are also wondering how safe is it to remove fonts from the res folder? We are only viewing PDFs without annotations or drawing, so there is never a need for text to display for the app itself. We're currently only using the PDFViewAct with none of the extra features.

Please let me know if you would like for me to clarify anything in this post. Please help us reduce the size of our APK file as much as possible.

Please Log in or Create an account to join the conversation.

size of viewlib and app APK -- how to reduce 3 years 5 months ago #9010

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
First of all you should remove unwanted cpus' architecture support like mips, arm 64bit and x64bit as 64bit specific support is not a real need on actual Android devices.
You will be able to remove about 15mb of .so files.

From res\raw folder you could remove arimo, cousine, geo, tinos fonts families.
Are fonts compatible to standard PDF fonts. If you would like to render PDF files embedding fonts family you won't need such external fonts files.
About 4mb will be removed from the your folder hierarchy.

I should discourage you to remove also cmaps and umaps files: are needed to decode non latin charset in the proper way.

Please Log in or Create an account to join the conversation.

size of viewlib and app APK -- how to reduce 3 years 5 months ago #9014

  • swarrenvcc
  • swarrenvcc's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Thanks for the reply.

I've removed the cmaps and umaps files, and I'm leaving the rest of the font files as we cannot predict what kinds of PDFs our users will use.

Are you sure that removing 64bit support won't significantly impact the performance of the Mobi reader? Have you tested this with a variety of devices?

Please Log in or Create an account to join the conversation.

size of viewlib and app APK -- how to reduce 3 years 5 months ago #9015

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
Same points you should think about:
- Actually there are few devices that are based upon 64bit cpu and running on a 64bit Linux kernel.
- 64bit architecture make ram access more efficient on devices with 4Gb+

From our tests 64bit version aren't a real need on actual Android devices.

About fonts: it depends upon the application you're developing.
If you are thinking about a generic PDF file reader fonts distribution would be a good choice.
If you're developing a bookshelf of a catalogue application: it would be sufficient to distribute PDF with proper embedded fonts.

Please Log in or Create an account to join the conversation.

size of viewlib and app APK -- how to reduce 3 years 5 months ago #9016

  • support
  • support's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 571
  • Karma: 6
  • Thank you received: 46
If you still have doubts there aren't alternatives: you should left all the .so and other files not being able to shrink your application size.

Please Log in or Create an account to join the conversation.

size of viewlib and app APK -- how to reduce 3 years 5 months ago #9017

  • swarrenvcc
  • swarrenvcc's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 8
  • Thank you received: 0
Thank you for providing more details. We've removed the 64bit support as well and the APK size is now around 10 megs. That should work for now.

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Powered by Kunena Forum