phonegap / phonegap-cli

PhoneGap and PhoneGap/Build command-line interface
Apache License 2.0
492 stars 157 forks source link

Auto Hide Splashscreen issue in android in phonegap cli 7.0.1 #738

Open mobileias opened 7 years ago

mobileias commented 7 years ago

Hello

We are creating build using phonegap web site.

We use below phonegap cli <preference name="phonegap-version" value="cli-7.0.1" />

also use latest splashscreen plugin

<plugin name="cordova-plugin-splashscreen" source="npm" version="4.0.3"/> <preference name="SplashScreen" value="screen" /> <preference name="SplashScreenDelay" value="100000" /> <preference name="SplashShowOnlyFirstTime" value="false" />

We hide splash screen manually using js code. as we checked in android OS only device plugin prompt for Manage calls related permission. we use below plugin <plugin name="cordova-plugin-device" source="npm" version="1.1.3" />

when it shows below type http://prntscr.com/gg6trn

then splash screen automatic hide.

So can you please help us to resolve that issue ?

Regards

surajpindoria commented 7 years ago

Hi @mobileias,

I am still not sure what your issue is. Could you explain further what is going on?

mobileias commented 7 years ago

Issue is we have added code like in config file like

AutoHideSplashScreen false.

So as per plugin documentation we need to hide manually using js code like

navigator.splashscreen.hide();

Now in android when any permission prompt like https://prnt.sc/gg6trn

then splash screen automatic hidden . even we not call this function. navigator.splashscreen.hide();

Thanks in advance

Regards

surajpindoria commented 7 years ago

Ok, I understand now. Unfortunately the way splash screens work it is essentially an alert box. So when the device permissions prompt comes up it will remove the splash screen, this is the expected behavior.

Another thing you could try is instead of prompting the permission on start up, you could try asking the user's permission when you actually need to access that functionality. This might help to resolve the issue with the splash screen.

Lastly, what is really concerning here is that the device plugin is requesting access to make phone calls. It does not do this in any of our tests and could possibly be a bug in the plugin.

mobileias commented 6 years ago

i try to check but not getting yet.

any idea how to show always splash screen until we hide manually even any prompt comes or not ?

Thanks in advance

Maheshwbc commented 6 years ago

Tried code config and device ready

$$(document).on('deviceready ', function () { setTimeout(function() { navigator.splashscreen.hide(); }, 300000000); });

Not working in iOS cordova application

Used versions Cordova version : current: 7.1.0 iOS version : ios 4.5.0

Thanks in advance