开发者

How to read the current location in a blackberry application

开发者 https://www.devze.com 2023-01-29 15:24 出处:网络
How do I read the latitude and longitude of current location in a开发者_开发知识库 black berry application?Look at using these classes: LocationProvider, Location, QualifiedCoordinates.

How do I read the latitude and longitude of current location in a开发者_开发知识库 black berry application?


Look at using these classes: LocationProvider, Location, QualifiedCoordinates.

LocationProvider provider = LocationProvider.getInstance(null);
Location loc = provider.getLocation(-1);
QualifiedCoordinates qc = loc.getQualifiedCoordinates();
//Call getLatitude() and getLongitude() in QualifiedCoordinates object.
0

精彩评论

暂无评论...
验证码 换一张
取 消