BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 08-10-2007, 05:32 AM   #1
iozturk
New Member
 
Join Date: Jul 2007
Model: 7100t
PIN: N/A
Carrier: JAVA
Posts: 5
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
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
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
iozturk
New Member
 
Join Date: Jul 2007
Model: 7100t
PIN: N/A
Carrier: JAVA
Posts: 5
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
xxxdev
Thumbs Must Hurt
 
Join Date: Aug 2007
Model: 8100
PIN: N/A
Carrier: xxx
Posts: 117
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
iozturk
New Member
 
Join Date: Jul 2007
Model: 7100t
PIN: N/A
Carrier: JAVA
Posts: 5
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
iozturk
New Member
 
Join Date: Jul 2007
Model: 7100t
PIN: N/A
Carrier: JAVA
Posts: 5
Default

Does anyone have a different idea?i still can not do what i want.
Offline  
Old 08-14-2007, 07:31 AM   #7
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
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
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M picture

iPhone 13 12 11 PRO MAX XR XS 8/7/6 Fast Charger USB Data Cable cord 10 feet/3M

$4.99



OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet  picture

OEM iPhone 11 PRO X/XR XS MAX 8/7 PLUS Fast Charging USB Cable 10 Feet & 6 Feet

$2.99



10 Foot/3M iPhone 12/11 PRO MAX X/10 XR XS 8/7 FAST Charging USB LONG Cable cord picture

10 Foot/3M iPhone 12/11 PRO MAX X/10 XR XS 8/7 FAST Charging USB LONG Cable cord

$4.98



10 Feet/3M For iPhone 13 12 11 PRO MAX MINI  X XR XS 8 7 Fast Charging USB Cable picture

10 Feet/3M For iPhone 13 12 11 PRO MAX MINI X XR XS 8 7 Fast Charging USB Cable

$5.00



Genuine A1417 OEM Battery Apple Macbook Pro 15 Retina A1398 Mid 2012 Early 2013 picture

Genuine A1417 OEM Battery Apple Macbook Pro 15 Retina A1398 Mid 2012 Early 2013

$37.90



OEM Battery for MacBook Pro 17

OEM Battery for MacBook Pro 17" A1309 A1297 Early 2009 Mid 2009 2010 MC226

$36.90







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