0
我正在開發一款具有GPS功能的BB應用程序。但問題是GPS標準因運營商和設備而異。那麼是否有人知道可以使用的不同設置標準?我試圖使用不同的鏈接BB支持論壇,但我沒有得到任何保證的方式,應該適用於每種情況。在此先感謝..黑莓GPS標準
謝謝; 無
我正在開發一款具有GPS功能的BB應用程序。但問題是GPS標準因運營商和設備而異。那麼是否有人知道可以使用的不同設置標準?我試圖使用不同的鏈接BB支持論壇,但我沒有得到任何保證的方式,應該適用於每種情況。在此先感謝..黑莓GPS標準
謝謝; 無
編輯:對不起剛注意到你的問題是關於運營商的標準......所以這不完全是答案。
我不是黑莓GPS標準的專家,我的答案是基於使用它幾次我用過它。
根據我的經驗,GPS標準基於一組要求(準確度,功耗,成本),並將這些數據輸入到標準對象中。例如,這裏是我從互聯網上下載的一些代碼。
/**
* assisted: Use this mode to get location information from satellites using a PDE. This mode allows a BlackBerry device
* application to retrieve location information faster than the autonomous mode and more accurately than the cell site mode.
* To use this mode requires wireless network coverage, and the BlackBerry device and the wireless service provider must
* support this mode.
*/
private Criteria getAssistedCriteria(int powerConsumption) {
Criteria criteria = new Criteria();
criteria.setHorizontalAccuracy(100);
criteria.setVerticalAccuracy(100);
criteria.setCostAllowed(true);
criteria.setPreferredPowerConsumption(powerConsumption);
return criteria;
}
/**
* autonomous: Use this mode to get location information from the GPS receiver on the BlackBerry device without assistance
* from the wireless network. This mode allows a BlackBerry device application to retrieve location information that has highaccuracy,
* and does not require assistance from the wireless network. However, the speed at which this mode retrieves
* location information is slower than the other modes.
*/
private Criteria getAutonomousPosCriteria() {
Criteria criteria = new Criteria();
criteria.setCostAllowed(false);
return criteria;
}
/**
* cell site: Use this mode to get location information from cell site towers. This mode allows a BlackBerry device application
* retrieve location information faster than the assisted and autonomous modes. However, the accuracy of the location
* information is low-level and does not provide tracking information such as speed or route information. Using this mode
* requires wireless network coverage and that both the BlackBerry device and the wireless service provider support this mode.
*/
private Criteria getCellSiteCriteria() {
Criteria criteria = new Criteria();
criteria.setHorizontalAccuracy(Criteria.NO_REQUIREMENT);
criteria.setVerticalAccuracy(Criteria.NO_REQUIREMENT);
criteria.setCostAllowed(true);
criteria.setPreferredPowerConsumption(Criteria.POWER_USAGE_LOW);
return criteria;
}
完整的文件位於:http://blackberry.svn.wordpress.org/trunk/src/com/wordpress/location/Gps.java
看一看在這個JavaDoc的表:http://www.blackberry.com/developers/docs/6.0.0api/javax/microedition/location/Criteria.html
我也正在此刻這個問題......如果你沒有看到他們,這兩個鏈接對我有幫助: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800703/What_Is_-_The_BlackBerry_smartphone_models_and_their_corresponding_GPS_capabilities.html?nodeid = 1371352&vernum = 0 http://supportforums.blackberry.com/t5/Java-Development/Location-APIs-Start-to-finish/ta-p/571949 最近關於Verizon論壇的討論 - 看起來像他們支持「獨立」僅模式: http://developer.verizon.com/forum/posts/list/1045.page – spacemanaki 2010-09-20 16:14:58