1
我已經通過標準成功獲得了我的黑莓手機的位置;黑莓手機信號塔位置
BlackBerryCriteria myCriteria = new BlackBerryCriteria(LocationInfo.GEOLOCATION_MODE)
地點是在下列情況下取得的:
- 在黑莓手機沒有移動網絡覆蓋
- 活動的Internet連接
- 沒有GPS定位
我問題是這是什麼l這是獲得 - GPS或單元塔三角?
我相信因爲位置是在沒有任何GPS定位的室內獲得的,所以它應該是一個Cell Tower位置。我沒有移動覆蓋,但位置被收購。如何獲得手機信息塔信息?如果我正在使用漫遊GPRS連接,獲取的位置是否有任何不同(基於IP設置)?作爲參考,以下是獲得該位置的完整代碼:
try
{
BlackBerryCriteria myCriteria = new BlackBerryCriteria(LocationInfo.GEOLOCATION_MODE);
try
{
BlackBerryLocationProvider myProvider = (BlackBerryLocationProvider)
LocationProvider.getInstance(myCriteria);
try
{
BlackBerryLocation myLocation = (BlackBerryLocation)myProvider.getLocation(30000);
double _longitude = myLocation.getQualifiedCoordinates().getLongitude();
double _latitude = myLocation.getQualifiedCoordinates().getLatitude();
setLocation(new Coordinates(_latitude, _longitude, 0.0f));
}
catch (InterruptedException e)
{
showException(e);
}
catch (LocationException e)
{
showException(e);
}
}
catch (LocationException e)
{
showException(e);
}
}
我無法獲取沒有WIFI的位置。我需要WiFi連接來獲取位置。獲取這個位置的方法是什麼?這是基於什麼的?其次,這在OS 6及其之後運行良好。但是OS 5不支持'LocationInfo.GEOLOCATION_MODE'。我應該在OS 5中使用什麼?請指導 – Sarah
@Sarah,請參閱我發佈的鏈接。 BlackBerry在OS 6中添加了「GEOLOCATION_MODE」(和「GEOLOCATION_MODE_WLAN」)。「GEOLOCATION_MODE」將選擇任何可用的位置修復。如果你沒有移動/蜂窩覆蓋,但有Wi-Fi,那麼它會選擇Wi-Fi。如果你真的**需要**支持OS 5.0(現在非常非常老),那麼你可以使用第三方解決方案。 [例如,Google有一個地理位置API](https://developers.google.com/maps/documentation/business/geolocation/),它支持wifi位置修復。 – Nate
[這是另一個鏈接](http://developer.verizon.com/content/vdc/en/verizon-tools-apis/verizon_apis/navbuilder-inside-sdk/verizon-toolsandapis-NBI-tech-resources/verizon- nbi-location-kit-api-reference.html)轉換爲支持Wi-Fi補丁的第三方解決方案,儘管這是特定的運營商(和國家)。 – Nate