BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-29-2008, 09:00 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Display a splashscreen

Please Login to Remove!

Hi there,
when the user starts my application, then there is a lot of configuration stuff etc to do.
so i decided to display a splashScreen, so that the user can see, the application is running.

before i start with more and more bla bla i show you what i have done so far, and what my problem is:
PHP Code:
public class OrdnerApp extends UiApplication implements KeyListener,TrackwheelListenerFolderListenerListFieldCallback 
public 
frmSplashScreen SplashScreen;
private 
MainScreen _screen;
 
    public static 
void main(Stringxxx91;xxx93; args) {
       
OrdnerApp app =  new OrdnerApp();
        
app.enterEventDispatcher();
    }
    
       
    private 
OrdnerApp() { 
    
SplashScreen = new frmSplashScreen(_screen);
     
_screen = new MainScreen();
   ....
  
_screen.addKeyListener(this);
        
_screen.addTrackwheelListener(this);
        
        
pushScreen(_screen); 
        
pushScreen(SplashScreen);
               
        
checkConfigEmail();
....
UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());   
}
...

So my problem is the following:
i start my application and i see the BB "desktop" after some seconds i see my application, but the mainform and not my splashscreen.

i think, the problem is, the screen is pushed and popped so fast that i can't see it, and the functions between pushing and popping are executet first and then the screenhandling starts.

i there a chance to push the screen first, then doing the other stuff and when it's done to pop the splashscreen? (hope you got an idea of this what i mean ;))

thanks so far.
hibbert
__________________
My English is so bad, that makes me nobody so quickly after

Last edited by hibbert : 09-29-2008 at 09:02 AM.
Offline  
Old 09-29-2008, 09:45 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

put your checkConfigEmail code in a separate thread and start it at the current code line, so it would not block your constructor and th eapplication will enter the event dispatcher mode.
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 09-29-2008, 09:56 AM   #3 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

remembered an article in RIM's KB:

Livelink - Redirection
__________________
Blessed is the end user who expects nothing, for he/she will not be disappointed. (Franklin's Rule)
Offline  
Old 09-30-2008, 04:18 AM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hello,
i have tried to put it in a seperate thread, but the problem is still the same.
here are some lines:
PHP Code:
   public static void main(Stringxxx91;xxx93; args) {
       
OrdnerApp app =  new OrdnerApp();
        
app.enterEventDispatcher();
    }
    private class 
OptionThread extends Thread {
        public 
void run() {
        
checkConfigEmail();
        
        try {
            
loadOptions();
           
TimerTask worker = new TimerTask();
            
worker.start(); 
            
UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());   
        
pushScreen(_screen); 
        }
    }
       
    private 
OrdnerApp() { 
    
SplashScreen = new frmSplashScreen();
    
pushScreen(SplashScreen);
    
UiApplication.getUiApplication().updateDisplay();
    
OptionThread _OptionThread = new OptionThread();
   
_OptionThread.start(); 
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.