使用Android提供的模拟任意地理位置的接口,执行如下方法时,会报异常:
Location localLocation = getLoc(LocationManager.GPS_PROVIDER);
mLocationManager.setTestProviderLocation(LocationManager.GPS_PROVIDER,
localLocation);
12-10 14:54:24.497: W/System.err(27548): java.lang.IllegalArgumentException: Incomplete location object, missing timestamp or accuracy? Location[gps 22.546054,114.025974 acc=0 et=?!? alt=0.0 vel=0.0 bear=0.0]
12-10 14:54:24.497: W/System.err(27548): at android.location.LocationManager.setTestProviderLocation(LocationManager.java:1218)
12-10 14:54:24.497: W/System.err(27548): at com.zhao3546.MockLocationServicePro$1.run(MockLocationServicePro.java:55)
12-10 14:54:24.497: W/System.err(27548): at android.os.Handler.handleCallback(Handler.java:725)
12-10 14:54:24.497: W/System.err(27548): at android.os.Handler.dispatchMessage(Handler.java:9