- This topic has 10 replies, 3 voices, and was last updated 10 years, 9 months ago by
Code_A.
-
AuthorPosts
-
Nie QueMemberim 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
Nie QueMemberhere’s my app wen i build it
Attachments:
You must be logged in to view attached files.
Code_AMemberThe 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
Nie QueMemberI’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.
Nie QueMemberI’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.
Code_AMemberIt 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.
Nie QueMemberso where can I put my timer code?? do i have to put a widget html container and put my timer code on it ?
Code_AMemberYou 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 }
Nie QueMemberI 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?
Unknown AuthorParticipantTry 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
Code_AMemberThe 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.
-
AuthorPosts