How to programmatically dismiss a preloader splashScreenImage

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

How to programmatically dismiss a preloader splashScreenImage

Erik J. Thomas
Hey all:

I'm using Application.splashScreenImage (it's a preloader) in my Flex mobile application which preloads a splash screen that needs to display until my app is finished loading data which varies due to device cpu, internet connection bandwidth, etc.

I need to discover a way to programmatically dismiss the splash screen before the 7 seconds expires if on a fast phone with a fast connection. Anyone know how I can do that? I've looked at all the APIs on the Application.splashScreenImage data member and cannot find a way though I've tried quite a few things.

Thanks!

Erik

<s:Application
   splashScreenImage="com.linqto.keiretsu.preloader.LaunchScreen"
   splashScreenScaleMode="zoom"
   splashScreenMinimumDisplayTime="7000"
   ...


Reply | Threaded
Open this post in threaded view
|

Re: How to programmatically dismiss a preloader splashScreenImage

Alex Harui-2
Why can't you lower the min time?

On 1/19/18, 8:50 AM, "Erik J. Thomas" <[hidden email]> wrote:

>Hey all:
>
>I'm using Application.splashScreenImage (it's a preloader) in my Flex
>mobile application which preloads a splash screen that needs to display
>until my app is finished loading data which varies due to device cpu,
>internet connection bandwidth, etc.
>
>I need to discover a way to programmatically dismiss the splash screen
>before the 7 seconds expires if on a fast phone with a fast connection.
>Anyone know how I can do that? I've looked at all the APIs on the
>Application.splashScreenImage data member and cannot find a way though
>I've tried quite a few things.
>
>Thanks!
>
>Erik
>
><s:Application
>   splashScreenImage="com.linqto.keiretsu.preloader.LaunchScreen"
>   splashScreenScaleMode="zoom"
>   splashScreenMinimumDisplayTime="7000"
>   ...
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to programmatically dismiss a preloader splashScreenImage

Erik J. Thomas
Hey Alex:

LOL, because of what I explained below. ;-)

My app is downloading a lot of data during initialization and the splash is displaying a "Loading..." message.

The time it takes to download the data I need to display the first view varies by a lot. On an iPhone 5 it could take 7 seconds, on an iPhone 8 it could take 2 seconds. I don't want iPhone 8 users to wait 7 seconds to see the first view, but I want the splash to remain in place on slow phones until the data is completely downloaded so the view is populated.

If I simply set splash duration to 2 seconds and the data isn't loaded when it dismisses, it shows a blank first view. This is disconcerting. I can of course show a busy cursor over a blank screen until it's loaded but that's not what the client wants.

Get me now?

Thanks so much!

Erik

On Jan 19, 2018, at 9:03 AM, Alex Harui <[hidden email]> wrote:

Why can't you lower the min time?

On 1/19/18, 8:50 AM, "Erik J. Thomas" <[hidden email]> wrote:

> Hey all:
>
> I'm using Application.splashScreenImage (it's a preloader) in my Flex
> mobile application which preloads a splash screen that needs to display
> until my app is finished loading data which varies due to device cpu,
> internet connection bandwidth, etc.
>
> I need to discover a way to programmatically dismiss the splash screen
> before the 7 seconds expires if on a fast phone with a fast connection.
> Anyone know how I can do that? I've looked at all the APIs on the
> Application.splashScreenImage data member and cannot find a way though
> I've tried quite a few things.
>
> Thanks!
>
> Erik
>
> <s:Application
>  splashScreenImage="com.linqto.keiretsu.preloader.LaunchScreen"
>  splashScreenScaleMode="zoom"
>  splashScreenMinimumDisplayTime="7000"
>  ...
>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to programmatically dismiss a preloader splashScreenImage

Erik J. Thomas
And yeah, before everyone reminds me that a downloading speed is not determined by how fast a phone is, yes, I understand that. LOL

I should have used bandwidth as the example, so phone 1 has dialog up speed, and phone 2 has Gigabit connection. I want the splash to stay up for a minimum of 2 seconds but long enough that the app is initialized with all the data it needs which might take as long as 7 or 8 seconds.

I can show a splash in the app itself once added to the stage, but the time it takes to load AIR runtime and 5 ANEs means the screen is blank for too long. The preloader splash solves that problem pretty well, but I still need a way to dismiss the splash when the app is ready to show the first view.

Thanks for any suggestions. I am reading up on custom preloaders and might be able to fire an event from the app the preloader listens for, but there must be a simpler way.

Erik

On Jan 19, 2018, at 9:15 AM, Erik J. Thomas <[hidden email]> wrote:

Hey Alex:

LOL, because of what I explained below. ;-)

My app is downloading a lot of data during initialization and the splash is displaying a "Loading..." message.

The time it takes to download the data I need to display the first view varies by a lot. On an iPhone 5 it could take 7 seconds, on an iPhone 8 it could take 2 seconds. I don't want iPhone 8 users to wait 7 seconds to see the first view, but I want the splash to remain in place on slow phones until the data is completely downloaded so the view is populated.

If I simply set splash duration to 2 seconds and the data isn't loaded when it dismisses, it shows a blank first view. This is disconcerting. I can of course show a busy cursor over a blank screen until it's loaded but that's not what the client wants.

Get me now?

Thanks so much!

Erik

On Jan 19, 2018, at 9:03 AM, Alex Harui <[hidden email]> wrote:

Why can't you lower the min time?

On 1/19/18, 8:50 AM, "Erik J. Thomas" <[hidden email]> wrote:

> Hey all:
>
> I'm using Application.splashScreenImage (it's a preloader) in my Flex
> mobile application which preloads a splash screen that needs to display
> until my app is finished loading data which varies due to device cpu,
> internet connection bandwidth, etc.
>
> I need to discover a way to programmatically dismiss the splash screen
> before the 7 seconds expires if on a fast phone with a fast connection.
> Anyone know how I can do that? I've looked at all the APIs on the
> Application.splashScreenImage data member and cannot find a way though
> I've tried quite a few things.
>
> Thanks!
>
> Erik
>
> <s:Application
> splashScreenImage="com.linqto.keiretsu.preloader.LaunchScreen"
> splashScreenScaleMode="zoom"
> splashScreenMinimumDisplayTime="7000"
> ...
>
>



Reply | Threaded
Open this post in threaded view
|

Re: How to programmatically dismiss a preloader splashScreenImage

Alex Harui-2
In reply to this post by Erik J. Thomas
I haven't used the mobile splash screen myself, so pardon my ignorance,
but I thought there were ways to tell the splash screen/preloader that it
isn't time to go away (which is why it is a min time, and not just a
duration).  I'm a bit swamped right now, but look for ways to delay the
preloader instead of ways to make it go away before the min time.

If you don't have any luck there, I will dig deeper later today or this
weekend.

-Alex

On 1/19/18, 9:15 AM, "Erik J. Thomas" <[hidden email]> wrote:

>Hey Alex:
>
>LOL, because of what I explained below. ;-)
>
>My app is downloading a lot of data during initialization and the splash
>is displaying a "Loading..." message.
>
>The time it takes to download the data I need to display the first view
>varies by a lot. On an iPhone 5 it could take 7 seconds, on an iPhone 8
>it could take 2 seconds. I don't want iPhone 8 users to wait 7 seconds to
>see the first view, but I want the splash to remain in place on slow
>phones until the data is completely downloaded so the view is populated.
>
>If I simply set splash duration to 2 seconds and the data isn't loaded
>when it dismisses, it shows a blank first view. This is disconcerting. I
>can of course show a busy cursor over a blank screen until it's loaded
>but that's not what the client wants.
>
>Get me now?
>
>Thanks so much!
>
>Erik
>
>On Jan 19, 2018, at 9:03 AM, Alex Harui <[hidden email]> wrote:
>
>Why can't you lower the min time?
>
>On 1/19/18, 8:50 AM, "Erik J. Thomas" <[hidden email]> wrote:
>
>> Hey all:
>>
>> I'm using Application.splashScreenImage (it's a preloader) in my Flex
>> mobile application which preloads a splash screen that needs to display
>> until my app is finished loading data which varies due to device cpu,
>> internet connection bandwidth, etc.
>>
>> I need to discover a way to programmatically dismiss the splash screen
>> before the 7 seconds expires if on a fast phone with a fast connection.
>> Anyone know how I can do that? I've looked at all the APIs on the
>> Application.splashScreenImage data member and cannot find a way though
>> I've tried quite a few things.
>>
>> Thanks!
>>
>> Erik
>>
>> <s:Application
>>  splashScreenImage="com.linqto.keiretsu.preloader.LaunchScreen"
>>  splashScreenScaleMode="zoom"
>>  splashScreenMinimumDisplayTime="7000"
>>  ...
>>
>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: How to programmatically dismiss a preloader splashScreenImage

Erik J. Thomas
Thanks, Alex. Don't spend any extra time on this though. Someone else may have solved for this. I'm still reading about custom preloaders and that may be my solution. I've searched the web a long time though and don't see anything about how to do this.

BTW, the minimum display time is mostly the maximum display time. In real use of this splash, it almost always goes away after the minimum time expires and if the app isn't ready, it just shows a blank screen. That property name probably should have been named splashScreenDisplayTime. Though it does stay up longer than min time once in a while. I can't figure out why but it probably waits for an initializedComplete event which would of course happen before all the data has finished downloading.

If I could just see the source code AIR uses to manage this preloader I could figure something out but it's flash native code as best I can figure.

Anyone else out there have an idea about this?

Thanks.

Erik

On Jan 19, 2018, at 9:24 AM, Alex Harui <[hidden email]> wrote:

I haven't used the mobile splash screen myself, so pardon my ignorance,
but I thought there were ways to tell the splash screen/preloader that it
isn't time to go away (which is why it is a min time, and not just a
duration).  I'm a bit swamped right now, but look for ways to delay the
preloader instead of ways to make it go away before the min time.

If you don't have any luck there, I will dig deeper later today or this
weekend.

-Alex

On 1/19/18, 9:15 AM, "Erik J. Thomas" <[hidden email]> wrote:

> Hey Alex:
>
> LOL, because of what I explained below. ;-)
>
> My app is downloading a lot of data during initialization and the splash
> is displaying a "Loading..." message.
>
> The time it takes to download the data I need to display the first view
> varies by a lot. On an iPhone 5 it could take 7 seconds, on an iPhone 8
> it could take 2 seconds. I don't want iPhone 8 users to wait 7 seconds to
> see the first view, but I want the splash to remain in place on slow
> phones until the data is completely downloaded so the view is populated.
>
> If I simply set splash duration to 2 seconds and the data isn't loaded
> when it dismisses, it shows a blank first view. This is disconcerting. I
> can of course show a busy cursor over a blank screen until it's loaded
> but that's not what the client wants.
>
> Get me now?
>
> Thanks so much!
>
> Erik
>
> On Jan 19, 2018, at 9:03 AM, Alex Harui <[hidden email]> wrote:
>
> Why can't you lower the min time?
>
> On 1/19/18, 8:50 AM, "Erik J. Thomas" <[hidden email]> wrote:
>
>> Hey all:
>>
>> I'm using Application.splashScreenImage (it's a preloader) in my Flex
>> mobile application which preloads a splash screen that needs to display
>> until my app is finished loading data which varies due to device cpu,
>> internet connection bandwidth, etc.
>>
>> I need to discover a way to programmatically dismiss the splash screen
>> before the 7 seconds expires if on a fast phone with a fast connection.
>> Anyone know how I can do that? I've looked at all the APIs on the
>> Application.splashScreenImage data member and cannot find a way though
>> I've tried quite a few things.
>>
>> Thanks!
>>
>> Erik
>>
>> <s:Application
>> splashScreenImage="com.linqto.keiretsu.preloader.LaunchScreen"
>> splashScreenScaleMode="zoom"
>> splashScreenMinimumDisplayTime="7000"
>> ...
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: How to programmatically dismiss a preloader splashScreenImage

Tom Chiverton
You could make the first state of your app the same as the splash
screen, and then advance to the first 'real' view once the data is done ?

Tom


On 19/01/18 17:35, Erik J. Thomas wrote:

> Thanks, Alex. Don't spend any extra time on this though. Someone else may have solved for this. I'm still reading about custom preloaders and that may be my solution. I've searched the web a long time though and don't see anything about how to do this.
>
> BTW, the minimum display time is mostly the maximum display time. In real use of this splash, it almost always goes away after the minimum time expires and if the app isn't ready, it just shows a blank screen. That property name probably should have been named splashScreenDisplayTime. Though it does stay up longer than min time once in a while. I can't figure out why but it probably waits for an initializedComplete event which would of course happen before all the data has finished downloading.
>
> If I could just see the source code AIR uses to manage this preloader I could figure something out but it's flash native code as best I can figure.
>
> Anyone else out there have an idea about this?
>
> Thanks.
>
> Erik
>
> On Jan 19, 2018, at 9:24 AM, Alex Harui <[hidden email]> wrote:
>
> I haven't used the mobile splash screen myself, so pardon my ignorance,
> but I thought there were ways to tell the splash screen/preloader that it
> isn't time to go away (which is why it is a min time, and not just a
> duration).  I'm a bit swamped right now, but look for ways to delay the
> preloader instead of ways to make it go away before the min time.
>
> If you don't have any luck there, I will dig deeper later today or this
> weekend.
>
> -Alex
>
> On 1/19/18, 9:15 AM, "Erik J. Thomas" <[hidden email]> wrote:
>
>> Hey Alex:
>>
>> LOL, because of what I explained below. ;-)
>>
>> My app is downloading a lot of data during initialization and the splash
>> is displaying a "Loading..." message.
>>
>> The time it takes to download the data I need to display the first view
>> varies by a lot. On an iPhone 5 it could take 7 seconds, on an iPhone 8
>> it could take 2 seconds. I don't want iPhone 8 users to wait 7 seconds to
>> see the first view, but I want the splash to remain in place on slow
>> phones until the data is completely downloaded so the view is populated.
>>
>> If I simply set splash duration to 2 seconds and the data isn't loaded
>> when it dismisses, it shows a blank first view. This is disconcerting. I
>> can of course show a busy cursor over a blank screen until it's loaded
>> but that's not what the client wants.
>>
>> Get me now?
>>
>> Thanks so much!
>>
>> Erik
>>
>> On Jan 19, 2018, at 9:03 AM, Alex Harui <[hidden email]> wrote:
>>
>> Why can't you lower the min time?
>>
>> On 1/19/18, 8:50 AM, "Erik J. Thomas" <[hidden email]> wrote:
>>
>>> Hey all:
>>>
>>> I'm using Application.splashScreenImage (it's a preloader) in my Flex
>>> mobile application which preloads a splash screen that needs to display
>>> until my app is finished loading data which varies due to device cpu,
>>> internet connection bandwidth, etc.
>>>
>>> I need to discover a way to programmatically dismiss the splash screen
>>> before the 7 seconds expires if on a fast phone with a fast connection.
>>> Anyone know how I can do that? I've looked at all the APIs on the
>>> Application.splashScreenImage data member and cannot find a way though
>>> I've tried quite a few things.
>>>
>>> Thanks!
>>>
>>> Erik
>>>
>>> <s:Application
>>> splashScreenImage="com.linqto.keiretsu.preloader.LaunchScreen"
>>> splashScreenScaleMode="zoom"
>>> splashScreenMinimumDisplayTime="7000"
>>> ...
>>>
>>>
>>
>
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________