我是新來的移動應用程序。基本上我想讓用戶的GPS座標在室內。 我在室外檢測移動設備時沒有問題,只有在室內給我帶來問題時纔有問題。 我曾嘗試設置準確性,但無濟於事。如何在移動設備上在室內使用GPS?
有沒有解決方法?
這裏是我的代碼:
new Thread()
{
public void run()
{
try
{
Criteria cr= new Criteria();
cr.setHorizontalAccuracy(1000);
LocationProvider lp= LocationProvider.getInstance(cr);
Location l = lp.getLocation(60);
Coordinates c = l.getQualifiedCoordinates();
if(c != null)
{
lat = c.getLatitude();
lon = c.getLongitude();
}
}
catch(Exception e)
{
System.out.println("Error");
}
}
}.start();
嗯,全球定位系統不能在室內工作...你幾乎需要視線到衛星它的工作。 –
看看這個:http://www.walletpop.com/blog/2010/02/01/gps-inside-the-mall-location-based-services-will-guide-you-to-d/ –