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


Blackberry Advertising Banner Vinyl Mesh Sign Fruit Vegetable Berry Farm Fresh picture

Blackberry Advertising Banner Vinyl Mesh Sign Fruit Vegetable Berry Farm Fresh

$179.95



(2 Pack) Gourmet BLACKBERRY SYRUP 32oz. Coffee Drink & Italian Soda Flavor picture

(2 Pack) Gourmet BLACKBERRY SYRUP 32oz. Coffee Drink & Italian Soda Flavor

$24.50



Gourmet BLACKBERRY Syrup 32oz. Coffee Drink & Italian Soda Flavor picture

Gourmet BLACKBERRY Syrup 32oz. Coffee Drink & Italian Soda Flavor

$15.75



BlackBerry Pearl 8100 Retail Display Unit - Pale Gold - Fake play movie Prop D3 picture

BlackBerry Pearl 8100 Retail Display Unit - Pale Gold - Fake play movie Prop D3

$12.99



FARM FRESH BLACKBERRIES CLEARANCE BANNER Advertising Vinyl Flag Sign AAA picture

FARM FRESH BLACKBERRIES CLEARANCE BANNER Advertising Vinyl Flag Sign AAA

$199.82



BLACKBERRY MEAD Advertising Vinyl Banner Flag Sign Many Sizes MEDIEVAL picture

BLACKBERRY MEAD Advertising Vinyl Banner Flag Sign Many Sizes MEDIEVAL

$99.19







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