0

Android エミュレーターの Worklight ロケーション API に問題があります。IBM Worklight Studio 6.2.0.01-20141027-1531 と Android エミュレーター OS レベル 4.4.2 を使用しています。

エミュレーターの場所を更新した後、これらは私が見ているログです:

W/PluginManager( 3350): THREAD WARNING: exec() call to WLGeolocationPlugin.getLocation blocked the main thread for 57ms. Plugin should use CordovaInterface.getThreadPool().
D/com.worklight.androidgap.plugin.WLLocationListener( 3350): WLLocationListener.onLocationChanged in WLLocationListener.java:174 :: The location has been updated!
D/com.worklight.androidgap.plugin.WLLocationListener( 3350): WLLocationListener.win in WLLocationListener.java:100 :: Acquired location age: 29991929 milliseconds. More than maximumAge of 10000 milliseconds. Ignoring.
D/com.worklight.androidgap.plugin.WLLocationListener( 3350): WLLocationListener.onStatusChanged in WLLocationListener.java:156 :: The status of the provider gps has changed
D/com.worklight.androidgap.plugin.WLLocationListener( 3350): WLLocationListener.onStatusChanged in WLLocationListener.java:162 :: gps is TEMPORARILY_UNAVAILABLE

ロケーション リスナーが UI をキャッチして更新していることを確認できる唯一の方法は、 maximumAge を 29991929 よりも高く設定することです。確かに、29991929+ ではなく、数ミリ秒のはずです。

また、299919290 のような非常に大きな数値を設定すると、最初の位置情報の更新しか取得できません。その後、場所を何度変更しても、それらの変更は反映されません。

D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.onLocationChanged in WLLocationListener.java:174 :: The location has been updated!
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.win in WLLocationListener.java:100 :: Acquired location age: 30321246 milliseconds. More than maximumAge of 100 milliseconds. Ignoring.
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.onLocationChanged in WLLocationListener.java:174 :: The location has been updated!
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.win in WLLocationListener.java:100 :: Acquired location age: 30320408 milliseconds. More than maximumAge of 100 milliseconds. Ignoring.
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.onLocationChanged in WLLocationListener.java:174 :: The location has been updated!
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.win in WLLocationListener.java:100 :: Acquired location age: 30319563 milliseconds. More than maximumAge of 100 milliseconds. Ignoring.
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.onLocationChanged in WLLocationListener.java:174 :: The location has been updated!
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.win in WLLocationListener.java:100 :: Acquired location age: 30318722 milliseconds. More than maximumAge of 100 milliseconds. Ignoring.
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.onLocationChanged in WLLocationListener.java:174 :: The location has been updated!
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.win in WLLocationListener.java:100 :: Acquired location age: 30317902 milliseconds. More than maximumAge of 100 milliseconds. Ignoring.
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.onLocationChanged in WLLocationListener.java:174 :: The location has been updated!
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.win in WLLocationListener.java:100 :: Acquired location age: 30317066 milliseconds. More than maximumAge of 100 milliseconds. Ignoring.
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.onLocationChanged in WLLocationListener.java:174 :: The location has been updated!
D/com.worklight.androidgap.plugin.WLLocationListener( 3452): WLLocationListener.win in WLLocationListener.java:100 :: Acquired location age: 30316258 milliseconds. More than maximumAge of 100 milliseconds. Ignoring.

実際のデバイスでは問題なく動作しますが、これをエミュレータで動作させる必要があります。

4

1 に答える 1