Tuesday 15 March 2011

android - WLLocationListener location age issues on emulator -



android - WLLocationListener location age issues on emulator -

i'm having issues worklight location api on android emulator. using ibm worklight studio 6.2.0.01-20141027-1531 , android emulator os level 4.4.2.

after updating emulator location, these logs i'm seeing:

w/pluginmanager( 3350): thread warning: exec() phone call wlgeolocationplugin.getlocation blocked main thread 57ms. plugin should utilize cordovainterface.getthreadpool(). d/com.worklight.androidgap.plugin.wllocationlistener( 3350): wllocationlistener.onlocationchanged in wllocationlistener.java:174 :: location has been updated! d/com.worklight.androidgap.plugin.wllocationlistener( 3350): wllocationlistener.win in wllocationlistener.java:100 :: acquired location age: 29991929 milliseconds. more maximumage of 10000 milliseconds. ignoring. d/com.worklight.androidgap.plugin.wllocationlistener( 3350): wllocationlistener.onstatuschanged in wllocationlistener.java:156 :: status of provider gps has changed d/com.worklight.androidgap.plugin.wllocationlistener( 3350): wllocationlistener.onstatuschanged in wllocationlistener.java:162 :: gps temporarily_unavailable

the way can see location listener catching , updating ui setting maximumage higher 29991929 - illustration 299919290. don't understand 29991929 age comes considering updated location. certainly should few milliseconds rather 29991929+

also if set crazy big number such 299919290, first location update. after that, no matter how alter location, changes not picked up:

d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.onlocationchanged in wllocationlistener.java:174 :: location has been updated! d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.win in wllocationlistener.java:100 :: acquired location age: 30321246 milliseconds. more maximumage of 100 milliseconds. ignoring. d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.onlocationchanged in wllocationlistener.java:174 :: location has been updated! d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.win in wllocationlistener.java:100 :: acquired location age: 30320408 milliseconds. more maximumage of 100 milliseconds. ignoring. d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.onlocationchanged in wllocationlistener.java:174 :: location has been updated! d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.win in wllocationlistener.java:100 :: acquired location age: 30319563 milliseconds. more maximumage of 100 milliseconds. ignoring. d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.onlocationchanged in wllocationlistener.java:174 :: location has been updated! d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.win in wllocationlistener.java:100 :: acquired location age: 30318722 milliseconds. more maximumage of 100 milliseconds. ignoring. d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.onlocationchanged in wllocationlistener.java:174 :: location has been updated! d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.win in wllocationlistener.java:100 :: acquired location age: 30317902 milliseconds. more maximumage of 100 milliseconds. ignoring. d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.onlocationchanged in wllocationlistener.java:174 :: location has been updated! d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.win in wllocationlistener.java:100 :: acquired location age: 30317066 milliseconds. more maximumage of 100 milliseconds. ignoring. d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.onlocationchanged in wllocationlistener.java:174 :: location has been updated! d/com.worklight.androidgap.plugin.wllocationlistener( 3452): wllocationlistener.win in wllocationlistener.java:100 :: acquired location age: 30316258 milliseconds. more maximumage of 100 milliseconds. ignoring.

works fine on actual device, need working on emulator.

unfortunately, emulator starts off giving time midnight (this known defect). since appears you're using hybrid environment should able test within mobile browser simulator - may want utilize scenario widget there allow test different scenarios in repeatable way. alternatively, can seek using mock locations or ibm rational test workbench (read this answer more).

android android-emulator worklight worklight-geolocation

No comments:

Post a Comment