ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
12.16k stars 1.01k forks source link

bug: (android) SplashScreen.show not resolving promise if splash is already being shown #3261

Closed sergiomilici closed 4 years ago

sergiomilici commented 4 years ago

Bug Report

Capacitor Version

💊   Capacitor Doctor  💊

Latest Dependencies:

  @capacitor/cli: 2.2.1
  @capacitor/core: 2.2.1
  @capacitor/android: 2.2.1
  @capacitor/electron: 2.2.1
  @capacitor/ios: 2.2.1

Installed Dependencies:

  @capacitor/cli 2.2.1
  @capacitor/ios 2.2.1
  @capacitor/android 2.2.1
  @capacitor/core 2.2.1
  @capacitor/electron not installed

[success] Android looking great! 👌
  Found 3 Capacitor plugins for ios:
    capacitor-firebase-auth (2.2.1)
    cordova-plugin-calendar (5.1.5)
    cordova-plugin-geolocation (4.0.2)
[success] iOS looking great! 👌

Platform(s)

Android

Current Behavior

On Android, calling the method SplashScreen.show() never resolves the returned promise if the splash screen is already being shown.

Expected Behavior

The promise is resolved if the splash is being shown or not.

Code Reproduction

async function showSplash(){
    await SplashScreen.show({autohide:false});
    console.log('This is printed'); 
    await SplashScreen.show({autohide:false}); // Waiting here to resolve the promise
    console.log('This is NOT printed'); 
}

Other Technical Details

npm --version output: 6.14.5

node --version output: v12.13.0

pod --version output (iOS issues only): It doesn't apply for ios.

ionitron-bot[bot] commented 1 year ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.