【发布时间】:2013-08-07 13:00:39
【问题描述】:
在我的应用程序中,我使用了 requestSingleUpdate() 方法,它在所有设备中运行良好,但在某些设备 2.3 android OS 版本中,GPS 无法获取位置。这是代码,
Intent intentp = new Intent(context, MyLocationReceiver.class);
pendingIntent = PendingIntent.getBroadcast(context, 0, intentp,PendingIntent.FLAG_UPDATE_CURRENT);
criteria = new Criteria();
criteria.setAccuracy(Criteria.ACCURACY_COARSE);
provider = locationManager.getBestProvider(criteria, true);
if(provider != null)
{
locationManager.requestSingleUpdate(provider, pendingIntent);
}
为什么带有 GPS 提供程序的 requestSingleUpdate() 方法在某些设备上不起作用? 特别不适用于 2.3.6 操作系统版本 GT - S5830 型号三星设备和 MicroMax A57。
【问题讨论】: