Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Paul_L_3
Beginner
181 Views

Fullscreen but still statusbar when we drag the top of screen

Hey,

I try to build my Android application.
I use CLI 6.2.0, Cordova Device Plugin 1.1.2, StatusBar plugin 2.1.3, Splashscreen plugin 3.2.2. And I checked the Fullscreen box in my settings.

I add these lines :

        document.addEventListener("deviceready", onDeviceReady, false);
      
        function onDeviceReady() {
            if (StatusBar.isVisible) {
                StatusBar.hide ();
            } 
        }

I think these lines are effective because when I do not use this snippets, when I use a text input in my app, the status bar appear, but when I use this snippet, the status bar does not appear.

But, when I touch/drag the top of my screen, the StatusBar Appear, this is very annoying for a game... How can I fix this issue ?

Nothing to do with Status bar, but how to hide the white screen at the application startup ? I search A LOT for correct this problem in internet but seriously, it seemed that nobody has a solution...

And At last but not least, I search a lot but cannot find how to do that : Disabling the shade for my SplashScreen, and why not increase the time of SplashScreen ?

Thank you,
Sorry for my english.

 

Tags (2)
0 Kudos
6 Replies
Paul_L_3
Beginner
181 Views

I cannot edit my message so.

I think I cannot defenitely hide the status bar...
I try right now to increase the time of Splashscreen, what's a big deal with Intel XDK...

I add these lines in config.additions

<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="5000" />

I try to add these lines at the start, and after in the android platform tag but nothing change...
What the hell with XDK Intel, this is no intuitive at all, my modification take NEVER effect !?

I try to change so many thing in my XML files
intelxdk.config.additions.xml
intelxdk.config.android.xml
intelxdk.config.android-app.xml
But hell no ! Intel XDK just does not care, that break my heart you know ?!

And let talk about the White Screen on startup... Aaaah this ugly white screen... I think this white screen is an issue from crosswalk because before using Intel XDK I used directly crosswalk with command line and I had also this ugly white screen...
I try demo application and yes they have also white screen on startup...

Some Intel XDK expert can help me in my fight against theses issues ?

Sorry again for my poor english

PaulF_IntelCorp
Employee
181 Views

Regarding the white screen, see this FAQ > https://software.intel.com/en-us/xdk/faqs/crosswalk#construct2-crosswalk-white-flash <

I'm assuming you are running a Construct2 app. Your attempts to lengthen the splash screen delay are not working because the Construct2 library is calling the splash screen hide function, effectively "short circuiting" your attempts to lengthen that delay. The XDK is not doing this to you, the C2 library is doing it. You need to modify the c2runtime.js file or talk to Scirra about providing some option to disable that feature, if that's what you need.

This code in the Construct2 c2runtime.js file is hiding the splashscreen:

	Runtime.prototype.go_loading_finished = function ()
	{

	...

		if (navigator["splashscreen"] && navigator["splashscreen"]["hide"])
			navigator["splashscreen"]["hide"]();

	...

	};

This code is located at line 4925 in the c2runtime.js file I was looking at (I don't know the version of that library, or if the contents of this file vary as a function of your game, but it should be sufficient to help you find what you're looking for).

Paul_L_3
Beginner
181 Views

Hi, Thank for your reply !

I am not sure I create a Construct2,
For build my project I did that :
Start a new project > HTML5 Companion hybrid mobile or web app > Templates > Games > Basic Canvas Games
I replace index.html by my index.html and add on header cordova.js script.

Is it a Construct2 application ?

I cannot find c2runtime.js

 

PaulF_IntelCorp
Employee
181 Views

That's not a Construct2 app.

Are you trying to manipulate the splash screen in the Simulate tab? You can only see it in a built app. If you build that simple canvas basic template without any modifications, and add a splash screen, are you able to manipulate the delay? You need to remove the cordova-init.js that is part of that template, notice that it is hiding the splash screen upon init (see the code in the template). You can just remove the reference to that script from the index.html file, or delete the cordova-init.js file, whichever you prefer.

BTW -- use the intelxdk.config.additions.xml file to configure the various Cordova preferences, the other config.xml files are generated automatically every time you build an app. Any changes you make to those config.xml files will be overwritten. The additions.xml file was created specifically for that reason. Look closely and you'll see that the additions.xml file is just added to the end of each of those other config.xml files, each time you do a build.

Paul_L_3
Beginner
181 Views

Hi again,

Ok I did what you said and it seems to work, the splash screen it delayed during 10 seconds. So problem must be in my code, but in my code I do not use cordova-init.js. I use xhr.js cordova.js that's all. So will dig, but I don't no where.

And what for white screen ? 

PaulF_IntelCorp
Employee
181 Views

Reply