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

Johnson Control Metasys AP-VMA1420-0 Actuator 24VDC 35 in-lb APVMA14200 VMA1420
$292.11
Johnson Control Metasys AP-VMA1420-0 Actuator 24VDC 35 in-lb APVMA14200 VMA1420 pictureJohnson Controls F93B-1 F93B-1C 1-1/4" Deep Wells Air Volume Controls - New OEM
$19.0
Johnson Controls F93B-1 F93B-1C 1-1/4JOHNSON CONTROLS T-4002-124 Mounting Bracket G1952785
$11.0
JOHNSON CONTROLS T-4002-124 Mounting Bracket G1952785 pictureJohnson Controls MS-NAE3514-2 Network Controller for Metasys
$500.0
Johnson Controls  MS-NAE3514-2 Network Controller for Metasys pictureJOHNSON CONTROLS XT9100 XT-9100-8304 L9936 *USED*
$34.95
JOHNSON CONTROLS XT9100 XT-9100-8304 L9936 *USED* picture






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