You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Volker Braun (JIRA)" <ji...@apache.org> on 2017/09/03 21:54:02 UTC

[jira] [Updated] (CB-13238) Splashscreen documentation dangerous

     [ https://issues.apache.org/jira/browse/CB-13238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Volker Braun updated CB-13238:
------------------------------
    Description: 
This seems to be a documentation issue, but for the record here is the back story first:

I reused the iOS 2730x2730 universal splash screen for the Android version, and copied the config.xml settings
{code}
    <splash src="res/screen/android/splash-port-hdpi.png" density="port-hdpi"/>
    <splash src="res/screen/android/splash-port-ldpi.png" density="port-ldpi"/>
    <splash src="res/screen/android/splash-port-mdpi.png" density="port-mdpi"/>
    <splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/>
{code}
as they are on https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/  Then my app is crashing with 
{code}
Fatal Exception: java.lang.RuntimeException: Canvas: trying to draw too large(119421184bytes) bitmap.
{code}
on startup on xxxhdpi devices (e.g. Samsung S8). Note the 119421184 bytes are 2730^2 pixel * 4 bytes color depth times an extra 2^2; The last factor is the rescaling from xhdpi -> xxxhdpi. 

I believe the documentation should be saying 
{code}
    <splash src="res/screen/android/splash-screen.png" density="anydpi"/>
{code}
since the splash screen is scaled to fill the screen anyways, we certainly don't want to blow it up first because we have a high dpi device. 

  was:
This seems to be a documentation issue, but for the record here is the back story first:

I reused the iOS 2730x2730 universal splash screen for the Android version, and copied the config.xml settings
{code}
    <splash src="res/screen/android/splash-port-hdpi.png" density="port-hdpi"/>
    <splash src="res/screen/android/splash-port-ldpi.png" density="port-ldpi"/>
    <splash src="res/screen/android/splash-port-mdpi.png" density="port-mdpi"/>
    <splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/>
{code}
as they are on https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/  Then my app is crashing with 
{code}
Fatal Exception: java.lang.RuntimeException: Canvas: trying to draw too large(119421184bytes) bitmap.
{code}
on startup on xxxhdpi devices (e.g. Samsung S8). Note the 119421184 bytes are 2730^2 pixel * 4 bytes color depth times an extra 2^2; The last factor is the rescaling from xhdpi -> xxxhdpi. 

I believe the documentation should be saying 
{code}
    <splash src="res/screen/android/splash-port-hdpi.png" density="anydpi"/>
{code}
since the splash screen is scaled to fill the screen anyways, we certainly don't want to blow it up first because we have a high dpi device.


> Splashscreen documentation dangerous
> ------------------------------------
>
>                 Key: CB-13238
>                 URL: https://issues.apache.org/jira/browse/CB-13238
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-splashscreen
>         Environment: xxxhdpi devices
>            Reporter: Volker Braun
>
> This seems to be a documentation issue, but for the record here is the back story first:
> I reused the iOS 2730x2730 universal splash screen for the Android version, and copied the config.xml settings
> {code}
>     <splash src="res/screen/android/splash-port-hdpi.png" density="port-hdpi"/>
>     <splash src="res/screen/android/splash-port-ldpi.png" density="port-ldpi"/>
>     <splash src="res/screen/android/splash-port-mdpi.png" density="port-mdpi"/>
>     <splash src="res/screen/android/splash-port-xhdpi.png" density="port-xhdpi"/>
> {code}
> as they are on https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/  Then my app is crashing with 
> {code}
> Fatal Exception: java.lang.RuntimeException: Canvas: trying to draw too large(119421184bytes) bitmap.
> {code}
> on startup on xxxhdpi devices (e.g. Samsung S8). Note the 119421184 bytes are 2730^2 pixel * 4 bytes color depth times an extra 2^2; The last factor is the rescaling from xhdpi -> xxxhdpi. 
> I believe the documentation should be saying 
> {code}
>     <splash src="res/screen/android/splash-screen.png" density="anydpi"/>
> {code}
> since the splash screen is scaled to fill the screen anyways, we certainly don't want to blow it up first because we have a high dpi device. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org