BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-10-2007, 05:32 AM   #1 (permalink)
New Member
 
Join Date: Jul 2007
Model: 7100t
PIN: N/A
Carrier: JAVA
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default PushModalScreen called by a non-event thread

Please Login to Remove!

Hello everyone,
I am a newbie and i have a push application that works as a system module and runs at start-up. When i push a message form server I want to see a pop up screen on blackberry (suppose that the main screen of bb is opened.we are not in any application.) When i try this i get en error like this: PushModalScreen called by a non-event thread. Do you have any solutions for this?
Offline  
Old 08-10-2007, 06:23 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
//your modal push
}
});
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 08-10-2007, 07:02 AM   #3 (permalink)
New Member
 
Join Date: Jul 2007
Model: 7100t
PIN: N/A
Carrier: JAVA
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Thanks for help.I tried it but i gat the same error. I am writing the code below. I wonder if i did something wrong.

UiApplication.getUiApplication().invokeLater(new Runnable(){
public void run(){
int trigger = NotificationsConstants.MANUAL_TRIGGER;
long timeout = -1;
long _eventIdGenerator=0;
Event2 e = new Event2(NotificationsDemo2.NOTIFICATIONS_ID_1, ++_eventIdGenerator, 500, timeout, trigger);
e.fire();
Dialog.ask(Dialog.D_OK,"Message");

}});
Offline  
Old 08-10-2007, 02:06 PM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Aug 2007
Model: 8100
PIN: N/A
Carrier: xxx
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by jfisher View Post
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
//your modal push
}
});
Try this:

synchronized (Application.getEventLock()) {

// your push here

}

XXXDev
Offline  
Old 08-13-2007, 01:01 AM   #5 (permalink)
New Member
 
Join Date: Jul 2007
Model: 7100t
PIN: N/A
Carrier: JAVA
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by xxxdev View Post
Try this:

synchronized (Application.getEventLock()) {

// your push here

}

XXXDev
Thanks for help but unfortunately this did not solve my problem too. The same error again.
Offline  
Old 08-14-2007, 02:54 AM   #6 (permalink)
New Member
 
Join Date: Jul 2007
Model: 7100t
PIN: N/A
Carrier: JAVA
Posts: 5
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Does anyone have a different idea?i still can not do what i want.
Offline  
Old 08-14-2007, 07:31 AM   #7 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

i solved a similar issue using:

synchronized (app.getEventLock()) {
app.invokeLater(new Runnable() {
public void run() {
app.pushScreen(new myScreen());
app.requestForeground();
}
});
}
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 08-14-2007, 08:21 AM   #8 (permalink)
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

this may also be of interest but i've never needed to try it:

Livelink - Redirection
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
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.