如何阅读黑莓应用程序中的当前位置

时间:2010-12-06 12:58:42

标签: blackberry gps

如何在黑莓应用程序中读取当前位置的纬度和经度?

1 个答案:

答案 0 :(得分:1)

请看这些课程:LocationProviderLocationQualifiedCoordinates

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