#1 2017-07-17 21:41:15

lanka
Guest

Android APP - Need Suggestion For Minimise the APK Size

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.

Last edited by lanka (2017-07-17 21:42:56)

#2 2017-07-18 10:50:08

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,709
Website

Re: Android APP - Need Suggestion For Minimise the APK Size

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.

Offline

#3 2017-07-18 10:55:06

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,709
Website

Re: Android APP - Need Suggestion For Minimise the APK Size

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.

Offline

#4 2018-01-15 14:11:18

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,709
Website

Re: Android APP - Need Suggestion For Minimise the APK Size

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!

Offline

#5 2018-01-18 23:12:26

edunt
Member
Registered: 2015-12-21
Posts: 262

Re: Android APP - Need Suggestion For Minimise the APK Size

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.

Last edited by edunt (2018-01-18 23:12:50)

Offline

#6 2018-01-18 23:43:38

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,709
Website

Re: Android APP - Need Suggestion For Minimise the APK Size

Hello to all,

edunt wrote:

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.

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.