Hi Kenneth,

We had a similar discussion within the XDK project team when someone wrote an 
app that failed to tear down the splash screen and had to wait 10 seconds until 
it timed out every time they ran their app in the emulator.  It was REALLY 
annoying and the user was VERY unhappy.  I don't think you can argue that the 
tools produced a good user experience even though this was the user's own 
fault. I would like to add that this happened despite the fact that the 
emulator's splash screen simulation contained the following text:

    This is a simulated splash screen
    The emulator displays splash screen for 10 seconds unless 
intel.xdk.device.hideSplashScreen() or navigator.splashscreen.hide() is called

Educating non-expert developers is not easy, especially in a world where nobody 
reads documentation anymore.

In our discussions we agreed that the emulator did the right thing to reproduce 
the behavior one would see on a real device. It was also pointed out that in 
most cases the user has taken no explicit action to invoke the splash screen, 
yet they inherit a requirement to tear it down.  That's inherently error-prone. 
 So far we have decreased the timeout to 3 seconds, which matches the Cordova 
default and is less annoying.  We're still discussing what our next step should 
be. The "New project" templates do contain code to tear down the splash screen 
in the deviceready event listener.

It's not so easy for a tool to tell whether the app is tearing down the splash 
screen correctly. It's sometimes necessary to extend the splash screen beyond 
deviceready, so that can't be treated as an error condition. It's also possible 
that the user intends the splash screen to end after a time out; that is, the 
app designer may feel that the splash screen cannot stay up any longer even if 
the app is not fully initialized. So that's not an error either.

    Julian

-----Original Message-----
From: Kenneth Rohde Christiansen [mailto:[email protected]] 
Sent: Monday, December 30, 2013 10:57 AM
To: Horn, Julian C
Cc: Wang, Shiliu; He, Xinchao; Li, Guangzhen; 
[email protected]
Subject: Re: [Crosswalk-dev] Intent to implement - SplashScreen API for xwalk 
based application.

1) Developers will notice that the splash screen never hides. I think it is 
worse that the developer thinks that they are doing things right and cannot 
figure out why it takes 3 whole seconds to load their app!
2) We can most definitely fix in our own implementation. Like store that it was 
called and hide when deviceready is called or similar.

Tools should be written to help with these things ie. the tool can check 
whether the hide is being called at the right spot etc and warn if not. A good 
tool should do that instead of adding workarounds in the underlying platform.

Tools should educate non-expert developers, point out what they are doing wrong 
and what they can do better, not trying to cover for their mistakes, and 
letting them remain bad/non-expert developers indefinitely.

If that is not what we are aiming at, the web platform will never succeed as an 
alternative to native application development.

Kenneth

On Mon, Dec 30, 2013 at 3:56 PM, Horn, Julian C <[email protected]> wrote:
> Hi Shiliu and Xinchao,
>
> Here is some rationale for why splash screens need to time out:
>
> Ideally no app should rely on the splash screen timeout.  Any amount of time 
> you pick will either be too short or too long, both of which are bad. 
> Unfortunately, programmers are not born understanding splash screens and 
> knowing how to write code that tears it down at the correct time. I hope it's 
> obvious that we want to make our tools work well even for non-expert 
> programmers.
>
> In the XDK project we have found that developers frequently make one of these 
> errors:
> 1) Forgetting to call the API that hides the splash screen.
> 2) Calling the API in a way that doesn't work.  For example, in Cordova, 
> attempting to call navigator.splashscreen.hide() before the deviceready event 
> arrives can fail. Sometimes people put the call after some other code that 
> throws an unexpected exception.
>
> If you don't time out or your time out period is long enough to be annoying 
> (10 seconds meets this standard), then developers are pretty much forced to 
> debug these kinds of errors before they can ship their app.  That's a bad 
> thing. The default timeout period for Cordova (and for the Intel XDK API) is 
> 3 seconds, which seems like a good compromise.
>
> Users that don't really understand splash screens will want to be able to 
> change that timeout. If they find the options relating to splash screen in 
> the package options, then they will expect to find one that changes the 
> timeout.  So while I don't think changing the default timeout period is 
> really the right approach, I think you should support it.
>
>     Julian
>
> -----Original Message-----
> From: Crosswalk-dev 
> [mailto:[email protected]] On Behalf 
> Of Wang, Shiliu
> Sent: Sunday, December 29, 2013 9:49 PM
> To: He, Xinchao; Li, Guangzhen
> Cc: [email protected]
> Subject: Re: [Crosswalk-dev] Intent to implement - SplashScreen API for xwalk 
> based application.
>
> Even with splash screen, it has a time limit within which it can help improve 
> user experience. A long time waiting with splash screen is also bad. So a 
> timeout is reasonable as my understanding.
>
> But on the other hand, the mechanism to dismiss the splash screen 
> automatically is very key.
> Have you considered following in addition to the two ways you listed?
> we also provide API to hide splash screen in js just like cordova, as well as 
> the api in manifest/package options to turn off automatical dismissing. So 
> that, if the developer wants things to be perfect on crosswalk, they can use 
> this approach.
>
> Thanks,
> Shiliu.
>
> -----Original Message-----
> From: He, Xinchao
> Sent: Monday, December 30, 2013 10:19 AM
> To: Li, Guangzhen
> Cc: Zhu, Yongsheng; Wang, Shiliu; 
> [email protected]
> Subject: Re: [Crosswalk-dev] Intent to implement - SplashScreen API for xwalk 
> based application.
>
> "Li, Guangzhen" <[email protected]> writes:
>
>> There are two ways to dismiss SplashScreen in Cordova
>> 1) App developers can decide when close splash screen by js :
>> navigator.splashscreen.hide()
>> 2) By timeout
>> Why we need the timeout, I think it’s the final chance to dismiss the splash 
>> screen, when there are some errors occurred on Runtime or Web app.
>>
>> Similar solution for Crosswalk runtime, I think we need to provide 
>> two ways
>> 1) When first visible page occurred, dismiss the SplashScreen (By 
>> some mechanism in runtime)
>> 2) By timeout
>>   Or the timeout can't be configured by the users, Can we make it build-in
>>   (few seconds)?
>
> There is another way to achieve this, when finished loading or error 
> occurred, dismiss the splash screen, but I really do not think it's needed to 
> hide the splash screen when error occurred in Runtime or apps. If using 
> timeout, a blank screen might be displayed for a while when loading a huge 
> application on a very slow device.
>
>>
>> -----original Message-----
>> From: He, Xinchao
>> Sent: Friday, December 27, 2013 4:37 PM
>> To: Li, Guangzhen
>> Cc: Zhu, Yongsheng; Wang, Shiliu;
>> [email protected]
>> Subject: Re: [Crosswalk-dev] Intent to implement - SplashScreen API for 
>> xwalk based application.
>>
>> For Crosswalk runtime model side, I don't think we need a "timeout"
>> property here, the WRT should decide how long will the splash screen 
>> displaying, and for different device, the timeout value should be 
>> also different, given a fixed splash screen timeout value is not an 
>> acceptable solution I think.
>>
>>
>> "Li, Guangzhen" <[email protected]> writes:
>>
>>> Thanks for your review for Tizen side.
>>> Below is just my draft proposal, need to get more feedback and discussion 
>>> from both sides.
>>> The images for xhdpi/hdpi/mdpi/ldpi are both optional in Android.
>>> Agree with you, we can provide only land/port firstly.
>>>
>>> The proposal changed to:
>>>
>>>     “splashscreen”: {
>>>         “landscape”: “splashscreen_land.png”,
>>>         “portrait”: “splashscreen_port.png”,
>>>         "timeout": "3000"
>>>      }
>>>
>>> I have add another item "timeout"
>>>
>>> Any comments?
>>>
>
> --
> Best Regards,
> He, Xinchao
> _______________________________________________
> Crosswalk-dev mailing list
> [email protected]
> https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev
> _______________________________________________
> Crosswalk-dev mailing list
> [email protected]
> https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev



--
Kenneth Rohde Christiansen
Web Platform Architect, Intel Corporation.
Phone  +45 4294 9458 ﹆﹆﹆
_______________________________________________
Crosswalk-dev mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev

Reply via email to