Software Archive
Read-only legacy content
17061 Discussions

android apk includes cordova default splash screen images

Roi_D_
New Contributor I
767 Views

android apk includes cordova default splash screen images even though the splash screen plugin is not included.

the splash screen images add 1.5MB to the apk size.

 

0 Kudos
12 Replies
Anusha_M_Intel1
Employee
767 Views

I am sorry but how did you come up with the 1.5mb figure? 

It is not possible to completely remove the default splashscreens from the build. You can hide them. Or you can use single colored splashscreen images that would be smaller in size. But the cordova splashscreen themselves are of a very small size and I doubt they contribute largely to the total file size. 

0 Kudos
Roi_D_
New Contributor I
767 Views

I opened the apk in windows with winrar and deleted the screen.png files from the res/drawable* folders. the apk from truncated from ~2MB to ~450K.
those png files are for different screens and 2 of them alone where 500K each. others were 100K and 40K.
I also notice icon.png launcher icons that are default cordova icon. so i guess intel xdk gui doesn't show me all icon resolutions possible?

see this screenshot showing 2 apks. in one i deleted all screen.png of the splashscreens.
http://prntscr.com/8j3fzs

it's a good suggestion for adding dummy splashscreens to override this but why is it not possible just not to include them if I didn't include the splashscreen plugin?

 

0 Kudos
Roi_D_
New Contributor I
767 Views

btw, I looked in an apk I built before with intel xdk and the splash screen images are not there.
I didn't choose my own and also the default are not in the package so the apk is very small.
So it was ok before and something changed.

 

0 Kudos
Anusha_M_Intel1
Employee
767 Views

I stand corrected. The cumulative file sizes are significant. I will place a request to our engineering team and update this post. 

I also notice icon.png launcher icons that are default cordova icon. so i guess intel xdk gui doesn't show me all icon resolutions possible?

There are four icons for the four sizes in Intel XDK GUI - LDPI, MDPI, HDPI and XHDPI

0 Kudos
Roi_D_
New Contributor I
767 Views

thanks.

 

about the icons. right the 4 sizes are being copied into 4 folders in res/drawable-[size] (e.g. res/drawable-hdpi-v4) 

but there is a fifth one in res/drawable/icon.png which is the default cordova icon. its 6.8K size 96x96.
why intel xdk doesn;t replace this one?

 

0 Kudos
Eric_H_Intel
Employee
767 Views

Cordova, by default, only cleans out the resource names that start with "drawable-" in both Cordova 4.1.2 and  5.1.1.  

Cordova solved this problem by removing the "res/drawable" directory in CLI 5.1.1/cordova-android 4.1.0.   For CLI 4.1.2/cordova-android 3.6.4, you can specify the default icon with no density to replace the default Cordova icon.

Eric

 

0 Kudos
Roi_D_
New Contributor I
767 Views

ok.

I updated to latest xdk 2496 and chose to build for CLI 5.1.1. now res/drawable/ folder is gone.
the default splash images still there. also the assets/www/res/ still there which is not needed.
does intel xdk support something like .pgbommit ?

also I see additional resources that were not there before. assets/www/cordova-js-src/
should it exists in the final apk ?

 

 

0 Kudos
Roi_D_
New Contributor I
767 Views

noticed more resources that should not be there.

the built apk by the xdk includes all assets fromthe  cordova-hello-world sample.

assets/www/css/index.css
assets/www/js/index.js
assets/www/img/logo.png

those assets should never being includes from the first place.

the only default asset not included in assets/www/index.html because I have my own index.html but my css and js are app.min.css and app.min.js so it seems the xdk copies the sample files if they don't exists.

 

 

0 Kudos
Eric_H_Intel
Employee
767 Views

I'll take a look at the contents and verify that we are not getting standard Cordova template files.

Eric

 

0 Kudos
Roi_D_
New Contributor I
767 Views

Hi,

any update about this?

thanks

 

 

 

0 Kudos
Roi_D_
New Contributor I
767 Views

bump. 

0 Kudos
Anusha_M_Intel1
Employee
767 Views

I will follow up with the engineer working on this and post an update as soon as I can. 

0 Kudos
Reply