English 中文(简体)
Blackberry - getLocation() method cannot be called from event thread
原标题:

I want to get the longitude and latitude of device. I used location api to get the longtitude and latitude the problem now I am facing is that I could not call the getLocation() method inside button click event. It throws an error as getLocation() method cannot be called from event thread.Can any one tell me how to solve this problem?

最佳回答

You simply create another thread and call getLocation() from that thread. See the documentation for java.lang.Thread in the API documentation.

问题回答

暂无回答




相关问题
Query about getting GPS Location

Is there any way to set Criteria for LocationProvider depending upon the network provider, means determining whether the network provider supports CellSite mode or autonomous mode or any other mode. ...

Android google map myLocationOverlay disappears?

I try to add myLocationOverlay to the map. It was not there at first, then when I send the gps position from the ddms, then the blue shining dot appear. However, after awhile, the blue dot disappear ...

Accessing GPS Data From a .Net Winform Application

Does anyone out there have any experience programatically retreiving the lat/long from a GPS attached to a mobile PC? A team I m on is currently looking at hardware options--as the programmer who ...

Can Google Maps plot points based on Hours Minutes Seconds

I m trying to plot out GPS data that is given to me in Hour Minute Second degree format. Will GLatLng take it in this form or do I need to convert it first. Having a hard time finding anything on the ...

热门标签