Closed vanessag closed 2 years ago
I can reproduce, it's caused because the splash gets destroyed on pause event, and the permission prompts trigger pause event.
Anyway, requesting permissions on app launch is not recommended, you should wait until the user is going to do something that requires the permission
https://developer.android.com/training/permissions/requesting#workflow_for_requesting_permissions
I agree with you but my app requires the location when the app starts because we are displaying information related to the user's location (if they allow of course). When the splash screen hides prematurely it leaves a blank white screen until the home page loads in.
This is no longer an issue on Capacitor 4 with version 4 of geolocation and splash-screen plugins if using the new Android 12 Splash Screen API.
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 the plugin, please create a new issue and ensure the template is fully filled out.
Bug Report
Capacitor Version
Platform(s)
Android only.
Current Behavior
1) Set capacitor config to manually hide splash screen:
"launchAutoHide": false
2) CallGeolocation.getCurrentPosition()
anywhere in the code 3) Splash screen will be hidden when the geolocation access prompt is shown.Expected Behavior
Geolocation.getCurrentPosition()
should not hide the splash screen. I would expect the geolocation access prompt to appear over the splash screen like it does in iOS.Code Reproduction
See 'Current Behavior' section.
Other Technical Details
npm --version
output: 6.14.12node --version
output: 14.16.1