BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-10-2009, 03:34 AM   #1 (permalink)
New Member
 
Join Date: Aug 2009
Model: 8330
PIN: N/A
Carrier: no one
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy [SOLVED]IllegalStateException issue when closing a PopupScreen

Please Login to Remove!

Hi all,

I've got a PopupScreen that uses a LocationProvider to get a GPS position and that displays acquire state.
But there is an IllegalStateException when trying to close it in the
Code:
public void locationUpdated(LocationProvider provider, Location location)
event invoked by my LocationProvider. I already tried with the
Code:
synchronized(UIApplication.getEventLock()) {
this.close();
}
and

Code:
synchronized(this) {
this.close();
}
in both popup screen and a method inside another component but it changes nothing at all . If anyone already saw this issue or have an idea about how to resolve this, it would be very helpfull for me.

Thanks in advance

Last edited by return0 : 08-10-2009 at 04:20 AM.
Offline  
Old 08-10-2009, 04:19 AM   #2 (permalink)
New Member
 
Join Date: Aug 2009
Model: 8330
PIN: N/A
Carrier: no one
Posts: 2
Post Thanks: 0
Thanked 0 Times in 0 Posts
Talking

Issue solved by stopping the location provider before the closing method and by still using the synchronized property.
Code:
this.oLocationProvider.setLocationListener(null, 0, 0, 0);
synchronized(UiApplication.getEventLock()) {
this.close();
}
Sorry for the disturb, week end was very hard for me
Offline  




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