01-11-2012 12:28 PM
Has anyone else tried to implement a continuously running GPS listener while running other tasks from a UI?
I am trying to implement the LocationListener for BlackBerryLocation libraries in place of the older Location libraries and I'm finding that these are causing the UI to be blocked now. I have the listener running in a separate thread but it still seems to cause the UI to get stuck.
If I comment out the line "BlackBerryLocationProvider.setLocationListener(..
I followed an example provided here and have it working fine in isolation:
But when I try to use the above within the context of my own UI, that has its own threads running that are doing other things (such as periodic updates to a web service) I get what appears to be a blocking issue.
A simpler view of this is provided here:
01-12-2012 02:24 PM
I tried something else but got the same result...
I made a new screen that implemented the LocationListener, and from within that spawned a new thread to send periodic updates to a web service. The periodic update thread works fine, and the screen remains responsive....that is until the location updates start coming in and the UI becomes slow and unresponsive.
I know I must be doing something wrong here. This was an easy thing to accomplish on the Windows Phone but for some reason I am making this harder than it should be on BlackBerry.