Java 安卓avd没有';不能接受超过3个坐标
这是我的密码。我将eclipse与avd一起使用,并将我想要的坐标发送给它。我看到,如果一个avd与API 7或更高版本一起使用,我的应用程序运行良好,但如果我与API 3一起使用avd,它只接受3个点,然后停止接受其他坐标(我仍然不知道API 4-5-6是否存在同样的问题,因为我现在正在尝试)。 编辑:API 4还可以Java 安卓avd没有';不能接受超过3个坐标,java,android,api,gps,locationlistener,Java,Android,Api,Gps,Locationlistener,这是我的密码。我将eclipse与avd一起使用,并将我想要的坐标发送给它。我看到,如果一个avd与API 7或更高版本一起使用,我的应用程序运行良好,但如果我与API 3一起使用avd,它只接受3个点,然后停止接受其他坐标(我仍然不知道API 4-5-6是否存在同样的问题,因为我现在正在尝试)。 编辑:API 4还可以 public class myActivity extends Activity { private TextView mytext; private Lo
public class myActivity extends Activity
{
private TextView mytext;
private LocationManager locmgr = null;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
GPSListener gpsListener=newGPSListener();
mytext = (TextView) findViewById(R.id.mytext);
//grab the location manager service
locmgr = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
locmgr.requestLocationUpdates(locmgr.GPS_PROVIDER, 10, 10, gpsListener);
mytext.setText("waiting for location");
}
//Start a location listener
private class GPSListener implements LocationListener
{
public void onLocationChanged(Location loc)
{
//sets and displays the lat/long when a location is provided
String latlong = "Lat: " + loc.getLatitude() + " Long: " + loc.getLongitude();
mytext.setText(latlong);
}
public void onProviderDisabled(String provider)
{
}
public void onProviderEnabled(String provider)
{
}
public void onStatusChanged(String provider, int status,
Bundle extras)
{
}
}
}
嗯,我不能说到底发生了什么,但我建议不要担心8(2.2)之前的Api级别 正如您在中所看到的,Api级别8之前的android用户实际上已经消失了(甚至Api级别8也几乎被“弃用”)