- Posts: 8
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
size of viewlib and app APK -- how to reduce
- swarrenvcc
- Topic Author
- Offline
- New Member
-
Less
More
10 years 7 months ago #9007
by swarrenvcc
size of viewlib and app APK -- how to reduce was created by swarrenvcc
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.
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.
10 years 7 months ago #9010
by support
Replied by support on topic size of viewlib and app APK -- how to reduce
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.
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.
- swarrenvcc
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 0
10 years 7 months ago #9014
by swarrenvcc
Replied by swarrenvcc on topic size of viewlib and app APK -- how to reduce
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?
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?
10 years 7 months ago #9015
by support
Replied by support on topic size of viewlib and app APK -- how to reduce
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.
- 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.
10 years 7 months ago #9016
by support
Replied by support on topic size of viewlib and app APK -- how to reduce
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.
- swarrenvcc
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 8
- Thank you received: 0
10 years 7 months ago #9017
by swarrenvcc
Replied by swarrenvcc on topic size of viewlib and app APK -- how to reduce
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.
Time to create page: 0.763 seconds