模拟器下正常,真机下无法获取地理信息

我通过经纬度获取对应的城市名,在模拟器下能正常获取,但在真机下却获取不到。请教下这是什么原因?该如何解决?我的代码如下:/**
* 根据经纬度取得城市
* @param location
*/
private String getLocationCity(double latitude,double longitude){
String city = "";
Geocoder geocoder = new Geocoder(this);
List

addresses = null;
try {
addresses = geocoder.getFromLocation(latitude, longitude, 1);
if(addresses != null && addresses.size() > 0){
for (int i = 0; i < addresses.size(); i++) {
Address address = addresses.get(i);
city = address.getLocality();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return city;
}
如有更好的方法,请大侠们赐教!

:P 问下,你手机应该网络是通的吧?还有就是你的手机是android那个版本的?
2.2的用着方法好像不行
还有另一种方法是

[code="java"]用http的方式请求google api 然后解析返回的数据吧

http://maps.google.cn/maps/geo?output=输出方式(csv,json,xml)&key=密钥随便&q=%s,%s(latitude, longitude)

String url = String.format(
"http://ditu.google.cn/maps/geo?output=json&key=abc&q=%s,%s",
latitude, longitude);
URLConnection httpsConn = (URLConnection) url.openConnection();
然后读数据解析啦
[/code]

是不是真机没设置好。