标签:android io ar 使用 sp 数据 on art 问题
============问题描述============
============解决方案1============
============解决方案2============
============解决方案3============
private android.location.LocationManager mLocationManager; LocationListener [] mLocationListeners = new LocationListener[] { new LocationListener(android.location.LocationManager.GPS_PROVIDER), new LocationListener(android.location.LocationManager.NETWORK_PROVIDER) }; if (mLocationManager == null) { mLocationManager = (android.location.LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE); } if (mLocationManager != null) { try { mLocationManager.requestLocationUpdates( android.location.LocationManager.NETWORK_PROVIDER, 1000, 0F, mLocationListeners[1]); } catch (SecurityException ex) { Log.i(TAG, "fail to request location update, ignore", ex); } catch (IllegalArgumentException ex) { Log.d(TAG, "provider does not exist " + ex.getMessage()); } try { mLocationManager.requestLocationUpdates( android.location.LocationManager.GPS_PROVIDER, 1000, 0F, mLocationListeners[0]); } catch (SecurityException ex) { Log.i(TAG, "fail to request location update, ignore", ex); } catch (IllegalArgumentException ex) { Log.d(TAG, "provider does not exist " + ex.getMessage()); } Log.d(TAG, "startReceivingLocationUpdates"); }
android定位问题
原文地址:http://www.cnblogs.com/meizhenfen42/p/4083156.html