我的 Android 应用程序尝试使用 Worklight Android API acquireGeoPosition 检索设备的当前位置。
地理政策细节如下所述 -
WLGeoAcquisitionPolicy geoPolicy = WLGeoAcquisitionPolicy.getLiveTrackingProfile();
geoPolicy.setTimeout(60000);
geoPolicy.setMaximumAge(15000);
有几次,我注意到应用程序在下面的堆栈跟踪中崩溃,上面写着“高度必须是非负的,为 -500.0”。有关可能引发此崩溃的任何线索,请...
FATAL EXCEPTION: Thread-361
java.lang.IllegalArgumentException: altitude must be non-negative, was -500.0
at com.worklight.location.api.geo.WLCoordinate.<init>(WLCoordinate.java:73)
at com.worklight.location.internal.geo.nativeImpl.AndroidLocationListener.convertToPosition(AndroidLocationListener.java:145)
at com.worklight.location.internal.geo.nativeImpl.AndroidLocationListener.onLocationChanged(AndroidLocationListener.java:140)
at android.location.LocationManager$ListenerTransport._handleMessage(LocationManager.java:268)
at android.location.LocationManager$ListenerTransport.access$000(LocationManager.java:201)
at android.location.LocationManager$ListenerTransport$2.handleMessage(LocationManager.java:224)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at com.worklight.location.internal.nativeImpl.AndroidRunnableExecutor$1.run(AndroidRunnableExecutor.java:45)
at java.lang.Thread.run(Thread.java:856)