zoontek / react-native-bootsplash

πŸš€ Show a splash screen during app startup. Hide it when you are ready.
MIT License
3.74k stars 258 forks source link

Logo is half size on Samsung Galaxy device #466

Closed RamProg closed 1 year ago

RamProg commented 1 year ago

Bug summary

Splash screen working fine on iOS. On Android, it looks fine on Pixel devices, but it looks half size in Samsung Galaxy S20+.

We were using v3 before and didn't have this issue. We migrated to v4 following all steps as per docs and started seeing this issue.

We regenerated the png with the command, and also tried the old ones. We also tried using an XML drawable and it always looks smaller on Samsung galaxy.

I found this very similar issue, but it never got a solution.https://github.com/zoontek/react-native-bootsplash/issues/410

Library version

4.7.3

Environment info

System:
    OS: macOS 12.6.3
    CPU: (10) arm64 Apple M1 Max
    Memory: 91.11 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.19.1 - ~/.nvm/versions/node/v16.19.1/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v16.19.1/bin/yarn
    npm: 8.19.3 - ~/.nvm/versions/node/v16.19.1/bin/npm
    Watchman: 2023.05.22.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: Not Found
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.2, iOS 16.2, macOS 13.1, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.2 AI-212.5712.43.2112.8609683
    Xcode: 14.2/14C18 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.16 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0 
    react-native: 0.71.6 => 0.71.6 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. Open the app on a Pixel Device
  2. Open the app on a Samsung Galaxy
  3. Notice a size difference in the logo

Reproducible sample code

<style name="BootTheme" parent="Theme.SplashScreen">
        <item name="windowSplashScreenBackground">@color/brandRed</item>
        <item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
        <item name="postSplashScreenTheme">@style/AppTheme</item>
    </style>
zoontek commented 1 year ago

I don't have a Samsung to reproduce this, but maybe Samsung implements the Android SplashScreen API incorrectly.

RamProg commented 1 year ago

I'll add to my backlog to try the example app on a Samsung device and see if the issue is there too.

zoontek commented 1 year ago

@RamProg I made a test using Browserstack with v5. I'm not sure if this continue to occur, as it records in 30 FPS and it's not enough to have every frame. If you have a physical device, please give it a try to confirm.

https://github.com/zoontek/react-native-bootsplash/assets/1902323/42c64005-58a2-4f68-84e5-d0602f68e900

zoontek commented 1 year ago

I found this: https://issuetracker.google.com/issues/251807014

Samsung aligned on splash screen sizing for One UI 5.0 (Android 13).

https://issuetracker.google.com/issues/247486677

Marked as fixed. Splash screen size is aligned in One UI 5.0

How is this even considered as a fix? Samsung phones with OneUI 4 / Android 12 still exist πŸ˜₯

https://issuetracker.google.com/issues/217891919

Status: Won't Fix (Infeasible)

nhutph commented 1 year ago

when you pr to master bro ?

zoontek commented 1 year ago

@nhutph I'm not your bro, please don't use that to discuss with OSS maintainers.

I'm waiting for the end of the 10 days non-regression window of my PR on the Expensify app (https://github.com/Expensify/App/pull/28644)

As I don't own Samsung phones, it's a good way to let the end users test it on lots of devices.

nhutph commented 1 year ago

@zoontek Sorry about that.

nhutph commented 1 year ago

any update for issue or status pr for issue ?

zoontek commented 1 year ago

It will be in 5.1.0 beta on wednesday (I have a day off)

zoontek commented 1 year ago

I published a beta, so anyone can test it: https://github.com/zoontek/react-native-bootsplash/pull/505

As I cannot fix what happen on the OS thread, I chose to keep the logo half sized for those devices. No size jump, even when using useHideAnimation. As this only occur on Samsung OneUI v4, I consider this a good enough solution.

alabsi91 commented 1 year ago

@zoontek Hey, I've recently upgraded to version 5 and encountered an issue with image zooming on the Samsung Galaxy S10. I wanted to inform you that I've tested the beta release, and it's working just as well as it did in version 4. Thank you.

zoontek commented 1 year ago

@alabsi91 Perfect, thank for your feedback πŸ™‚ I will probably release the stable 5.1.0 this weekend.

alabsi91 commented 1 year ago

@zoontek I'm sorry, but I just found an issue. I barely noticed it, when navigating using React Navigation, the splash screen appears during the transition between the screens for a split second.

zoontek commented 1 year ago

@alabsi91 please provide a simple reproduction

alabsi91 commented 1 year ago

repo: https://github.com/alabsi91/splash-screen-android-issue

https://github.com/zoontek/react-native-bootsplash/assets/58077449/8f509908-3f2c-44c5-a7b4-90b5343b5b6f

zoontek commented 1 year ago

@alabsi91 perfect, thanks a lot, I will have a look in the following days πŸ™

zoontek commented 1 year ago

@alabsi91 I tried a lot of things, but keeping a View is creating a lot of issues (the one you mention, but also some flicker on hide), so I rolled back to Dialog implem (with an attempt to fix https://github.com/zoontek/react-native-bootsplash/issues/498). Latest version is 5.1.0-beta.2, give it a try but it should works correctly now (including on Samsungs with OneUI v4)

Thanks again for the reproduction, it saves me some time, I really appreciated it πŸ™

alabsi91 commented 1 year ago

@zoontek πŸ™Œ Thank you for your amazing work! I've tested the new fix on a Galaxy S10 device with One UI version 4.1, and everything is looking great so far πŸ‘

zoontek commented 1 year ago

5.1.0 is here. I'm closing this issue, as I cannot fix the size on the system thread - at least the size is stable now.

huextrat commented 1 year ago

@zoontek 5.1.0 was working fine, but it seems that the issue is still here in 5.1.1 ? πŸ€”

zoontek commented 1 year ago

@huextrat Are you using brand image? That's the only change for the samsungs from 5.1.0 -> 5.1.1

I know they size the logo incorrectly, but I found no info about them sizing the brand image incorrectly too

huextrat commented 1 year ago

@huextrat Are you using brand image? That's the only change for the samsungs from 5.1.0 -> 5.1.1

I know they size the logo incorrectly, but I found no info about them sizing the brand image incorrectly too

Ok seems to working fine on 5.1.2 🀷 I may have look at the wrong version. Anyway, thanks :)

zoontek commented 1 year ago

@huextrat Maybe a cache issue? Even on 5.1.1, the code responsible for picking the OneUI v4 specific drawable didn't change πŸ€·πŸ»β€β™‚οΈ

dkahdwk commented 10 months ago

@zoontek On Galaxy Note 10 devices, the image size is still significantly reduced. I really wanted to see if there was a problem with the react-native-bootsplash library, so I ran other popular apps on that device and was surprised to find that all applications experienced a significant reduction in splash image size. This issue is not this library issue, but as I said, it's probably an Android issue. So I decided to give up on this issueπŸ₯Ή

zoontek commented 10 months ago

Probably that Samsung computer the size in another incorrect way on Note device. At some point, we can patch it (here the fix target OneUI v4, are we supposed to a patched layout per device?) 😞. At least they fixed it on Android 13.

dkahdwk commented 10 months ago

@zoontek I forgot it was about OneUI v4....i just wanted to share. Anyway, thank you for your hard work!

NiharR27 commented 10 months ago

Hi @zoontek, Thanks for the awesome package :)! this might not be the correct issue (i got here from some other issue relating to double splash screen,etc). We had the version v5.0.3 installed and that worked fine. But before going Christmas we bumped the version to v5.1.3, this has fixed the above problem of double logos on android (it was all good on iOS). It however is stretching logos now - it's almost like they are fixed in a certain width and height with stretching in it). I have tried going to ^5.2.2 and we still face the issue (so we had to bump it back to 5.0.3 till we figure out what is wrong with it), it's not stretching all the logos, but some of them. Have you by any chance come across this issue? I tried searching the open / closed issue but couldn't see anything specifically about it. Thanks again, have a nice week!

zoontek commented 10 months ago

@NiharR27 What phone do you have? A Samsung on OneUI v4?

NiharR27 commented 10 months ago

@NiharR27 What phone do you have? A Samsung on OneUI v4?

I tested on Samsung Galaxy S21 5G OS Version 13 (gotta check the above, not really sure about oneUI v4).

Currently i am testing on Google Pixel 5 API 30 Sim

zoontek commented 10 months ago

So no, not the same issue. Please open a new one with a solid reproduction.

NiharR27 commented 10 months ago

So no, not the same issue. Please open a new one with a solid reproduction.

ok πŸ‘ŒπŸ½ will do thanks.