facebook

how to increase timeout on the start up screen on my app

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #350283 Reply

    Nie Que
    Member

    im using MOBIONE on the mobile application im working on. I want to display a loading page before the content of my app displays. is it possible to increase the time out of the start screen and customize it with a loading gif ???

    I found this iscroll.js file on my project and there’s a timeout code in there. Can you help me where will i change to increase the timeout ?? http://www.screencast.com/t/EscBsZxL

    #350284 Reply

    Nie Que
    Member

    here’s my app wen i build it

    Attachments:
    You must be logged in to view attached files.
    #350292 Reply

    Code_A
    Member

    The startup screen duration is os specific. You can only control what happens after your app has launched, so basically you need to setup your app to show the startup screen as the first screen after the os loads the app into memory. Here is a related post that may help: viewtopic.php?f=8&t=7019

    #350325 Reply

    Nie Que
    Member

    I’ve read the related post above and tried it on my app. i was wondering is there any setting on how to extend the duration of the start up?? or do i have to code it myself?? I really need your help.. looking forward for any reply. thank you.

    #350326 Reply

    Nie Que
    Member

    I’ve read the related post above and tried it on my app. i was wondering is there any setting on how to extend the duration of the start up?? or do i have to code it myself?? I really need your help.. looking forward for any reply. thank you.

    #350328 Reply

    Code_A
    Member

    It is my understanding that the duration of the startup screen is dependent on how long it takes the os to load your app into memory. I do not believe this is a “setting” that can be changed.

    None of your code will run until your app is loaded by the os, that is why I suggested setting your splash screen as the first screen of your app. Then you can run your code and go to the next screen when your code is done executing or when a timer ends.

    #350329 Reply

    Nie Que
    Member

    so where can I put my timer code?? do i have to put a widget html container and put my timer code on it ?

    #350333 Reply

    Code_A
    Member

    You can put the following timer code in your _custom.js file within your project’s www folder in the documentReadyHandler function.

    phoneui.documentReadyHandler = function() {
        //timer for splash screen
        setTimeout(function() {
            phoneui.gotoScreen('m1-nextScreen', 'FADE'); //nextScreen is the screen name in this example
        }, 3000 ); //3sec delay used here
    
        //add loading code
    }
    #350338 Reply

    Nie Que
    Member

    I tried the code you gave but didn’t work.

    phoneui.documentReadyHandler = function() {
    //timer for splash screen
    setTimeout(function() {
    phoneui.gotoScreen(‘m1-Home’, ‘FADE’); //Home is the file name of the page that I want to redirect after the splash screen.
    }, 5000 );

    }

    Is there an additional configuration aside from the code above?? or just the code itself would work?

    #350341 Reply

    Unknown Author
    Participant

    Try some creative slight-of-hand, where your splashscreen and your homescreen are identical. Then you can linger on your homescreen for however long you want without the user knowing. Then do a disolve to the real homescreen.

    -1TC

    #350342 Reply

    Code_A
    Member

    The code should work. The only reason I can think that it wouldn’t is if you are using a multipage widget instead to handle your pages, or you have not added the home.mobi file to your project in the additional project files section.

    For multipage:

    phoneui.gotoMultiPagePage('m1-<screen >-multiPage1', 'SET_PAGE', 'm1-<screen>-page1', 'NONE');

    Post your file example if you still can’t get it working.

Viewing 11 posts - 1 through 11 (of 11 total)
Reply To: how to increase timeout on the start up screen on my app

You must be logged in to post in the forum log in