Android APP - Need Suggestion For Minimise the APK Size


Guest

Long Story Short :

I have created app (PDF book) for android. That PDF size is litter biger (about 80MB). Now APK is very heavy.

There is a solution which host APK somewhere online and then embed it in to the iframe. Solution works perfectly.

But when I host PDF online, some users having another issue which they need to load it always when they need to read.

There are two type of users I have. One Don't like to keep bigger size of app. Second don't like to spend data to access embed pdf file.

Only solution I can see is one is light app with embed PDF and second is heavy app which PDF file in the apk.

However do you guys have any other solution, suggestion ? If we can make only one app and then if user need PDF in their device they can click button and download once and read it trough app. Whoever doesn't like PDF in phone can use embed PDF option and read it online trough app.

Thanks all.
LK.


DecSoft

Hello lanka,

First of all, I must recognize some AB lacks talking about download files, and, in general, when we must play with arbitrary files on the devices. Certainly we have right now actions like "FileWrite", "FileRead", etc. And of course we always can deal directly with the Cordova's File and FileTransfer plugins in order to download files, but the point is to allow to use these plugins in an AB style, in a more easy way.

Probably I must work on that lacks in the near future, however, I am not sure if here we are onto another kind of "issue". Certainly deal with a 80 MB PDF file is not too much efficient... no matter if we must download it, or include it with the application. However, probably the best approach is to download that file, even more if we can let the user the option to download that big file or not.

So what I propose? I think maybe you can consider to split that PDF file in various parts, of course, if that is possible. Then you can place the PDF files inside the application or in the app's server. In the first case the size of the application can continue be big (since the PDF, even divided, continue to be big), but, maybe this can be acceptable if we consider the advantages: we no need to download the PDF files at all. But we can gain some advantage if place the small PDF files in the server, because the time to visualize it is reduced.

But what solution I propose? Taking the above paragraph in consideration, if you finally can split the PDF into smaller files, then probably the app's server solution is enough: the users can visualize the PDF files from the server, but no need to download 80 MB everytime they wanted to take a look. If you can't or do not want to split the big PDF file into smaller files, then maybe the only solution right now are to include the PDF with your application, or, deal with the refered Cordova's plugins directly.

This last is perfectly possible, you must to follow the plugins documentation and use the appropiate Javascript API from AB. If you finally decide to choose this option, and need ANY help, just post here your specific problems, lanka, and we will try to help you.



DecSoft

Hello to all,

After a search on Google I find this service that may can be useful:

https://www.splitpdf.com/

P.S. I certainly did not try it, but it's the first result of the search: I mean probably we can find several tools that help us to split a PDF file into smaller ones, if this can be a possible solution for us.



DecSoft

Hello to all,

Just to inform that the current release of DecSoft's App Builder added the new FileDownload action, as well the new "FileDownload" app sample. We can use this action to easily download files in both the app private storage or the user device storage.

Hope they can be useful!



Ade Wale

Hi,

Good to hear that there is new FileDownload on the release.
Although, I don't have latest version license at the moment to test it.
However, I will say well done David. Happy new year.

@Ianka: I will suggest that you should compress the pdf with this tool FILEminimizer by balesio. Maybe it might help. If not then David's idea is the best.


DecSoft

Hello to all,

Hi,

Good to hear that there is new FileDownload on the release.
Although, I don't have latest version license at the moment to test it.
However, I will say well done David. Happy new year.

@Ianka: I will suggest that you should compress the pdf with this tool FILEminimizer by balesio. Maybe it might help. If not then David's idea is the best.

You know that AB apps can be extended with any thirdparty Javascript and Cordova plugins, so, even if you can't use the new "FileDownload" action (however, not only by this, I recommend you to upgrade your AB license), you can always use the right Apache Cordova plugins: Device, File and FileTransfer.

You can find several samples (in the Cordova documentation, for example) about how to proceed. If you need any help, just post here and we will try to help you edunt.



Ade Wale

Hi David,

Thank you. Soon I will upgrade my license. It seem like I have been missing alot of new features and sample project.

Keep up David.

Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.