关于黑莓Curve 8520得到蜂窝基站GPS定位 [英] Obtaining cellsite gps location on Blackberry Curve 8520
问题描述
我的手机的详细信息:
型号:黑莓Curve 8520
版本:5.0.0.1036
数据服务:上
当我安装谷歌地图,我能看到的位置,所以使用这款手机获得当前位置的机会。
我想开发一个应用程序,它会显示手机的当前位置,使用蜂窝站点的位置,因为这款手机的型号不具有内置GPS设备。
我用下面的code:
条条条BlackBerryCriteria BC =新的条条条BlackBerryCriteria(GPSInfo GPS_MODE_CELLSITE);
尝试{
LocationProvider LP = LocationProvider.getInstance(BC);
如果(LP!= NULL)
{
位置LOC = lp.getLocation(-1);
添新EditField(loc.getQualifiedCoordinates().getLatitude()+\"\
\"+loc.getQualifiedCoordinates().getLongitude(),\"\"));
}
其他
{
添加(新EditField中(无法找到位置提供者,));
}
}赶上(LocationException E){
// TODO自动生成catch块
e.printStackTrace();
}赶上(例外五){
// TODO自动生成catch块
e.printStackTrace();
}}
我安装使用Desktop Manager中的BB手机上的ALX文件。
在启动应用程序它给我一个未捕获的异常:
NET.RIM.DEVICE.API.SYSTEM.UNSupportedOperationException。
块引用>解决方案设备可能目前不支持GPS_MODE_CELLSITE。检查是否使用了
GPSInfo.isGPSModeAvailable(GPS_MODE_CELLSITE)
和使用另外一种模式,如果neccessary。
这可能不支持GPS_MODE_CELLSITE因为:
- 有手机内无有效的SIM卡(好吧,我假设你有一个:)
- 检查您的设备和运营商都正在使用的GPS模式(<一个href=\"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\"相对=nofollow>这里)
- 如果您的运营商是Verizone,检查为Verizon GPSSettings签名要求
- 您的APN设置不正确(选项>设备>高级设置> TCP IP)
- 您没有黑莓服务计划(不太清楚那一个)
Details of my phone:
Model:Blackberry Curve 8520 Version :5.0.0.1036 data services :on
When I am installing google maps I am able to see the location ,so there is a chance of obtaining the current location using this phone.
I am trying to develop an application which will show the current location of the phone,by using the cell site locations because this phone model does not have an in-built GPS device.
I am using the following code:
BlackBerryCriteria bc=new BlackBerryCriteria(GPSInfo. GPS_MODE_CELLSITE ); try { LocationProvider lp=LocationProvider.getInstance(bc); if(lp !=null) { Location loc=lp.getLocation(-1); add (new EditField(loc.getQualifiedCoordinates().getLatitude()+"\n"+loc.getQualifiedCoordinates().getLongitude(),"")); } else { add(new EditField("unable to find the location provider", "")); } } catch (LocationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); }}
I am installing the alx file on the bb phone using desktop manager.
On starting the application it is giving me an Uncaught exception:
NET.RIM.DEVICE.API.SYSTEM.UNSupportedOperationException.
解决方案The device might currently not support GPS_MODE_CELLSITE. Check using
GPSInfo.isGPSModeAvailable(GPS_MODE_CELLSITE)
and use another mode if neccessary.
It might not support GPS_MODE_CELLSITE because:
- There is no valid SIM card in your phone (ok, i assume you have one :)
- Check if your device and carrier have available GPS mode you are using (here)
- If your carrier is Verizone, check for Verizon GPSSettings signing requirement
- Your APN settings are not correct (Options > Device > Advanced Settings > TCP IP)
- You don't have a BlackBerry Service Plan (not too sure about that one)
这篇关于关于黑莓Curve 8520得到蜂窝基站GPS定位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!