Try this! Weather sample doesn't work all the time

Try building the weather widget and running it on the device (920 in my case) three or four times, i.e. load it, change to another widget then load again etc, works fine but then just hangs there with 'waiting for gps'.

I suspect this is a connectiq bug!!!!
  • It works consistently for me on a va running 3.20 FW - just tried it 20 or so times in a row during a walk. Got GPS and "waiting for data" within a second or two...
  • It works consistently for me on a va running 3.20 FW - just tried it 20 or so times in a row during a walk. Got GPS and "waiting for data" within a second or two...



    and what about indoors?

    also could someone try a 920 indoors and outdoors?

    what I would like to see is a sample that trys to use the gps if it fails uses the last known position, trys to comm with phone and go and get weather. at each stage if there is a failure then report it to the user in a nice way rther than just a iq screen with exclamation mark. Garmin?
  • Using the garmin weather sample on the 920 outdoors it works three times then just sits there on the waiting for Gps screen. Garmin can you test please?
  • It works fine in my house. Ina a big concrete and steel building, it might have trouble getting GPS - as anything using GPS would.
  • It works fine in my house. Ina a big concrete and steel building, it might have trouble getting GPS - as anything using GPS would.


    If it has trouble getting GPS does it just sit there saying waiting for GPS.

    Seems to me this is flawed as a real world working example. It is probably always better never to try and get the GPS location as if it's called three times it causes issues (at least on the 920 it does) and simply rely on the last known position.

    Ho hum.

    Garmin?
  • I'll give it a test and see if I can reproduce the issue. I've used the weather sample quite a bit in the past and haven't noticed issues with it. A couple of things to keep in mind:

    1. It's a sample app meant to demonstrate the basic use of makeJsonRequest(), so shouldn't be expected to have much sophistication
    2. You're not likely to get GPS acquisition indoors (though you may), so this is really not a valid use case for this sample.

    I agree that it should probably use last known position if it's not able to acquire GPS, assuming that there is a last position available, but I'm not clear what the expected behavior is here. I was asking around yesterday to find out whether there is an expiration on the position data that happens at a lower level (Connect IQ just requests the position from the OS--it doesn't have any control over it), but I haven't gotten an answer yet.
  • Brandon - from what I've seen in testing, "last known" seems to be available for maybe an hour or two after the last time GPS was used. I can see where after a period of time, the device considers the data sale and doesn't use it.

    For my weather widget, I actually store the last location in the Object Store, and the next time the widget is used, it starts with that location. The user can request getting a new GPS location by tapping the screen. Something like that could be a solution.
  • I was able to reproduce this issue, so I'll get it reported. I don't think it's a problem with the weather sample specifically, but it could be a Connect IQ issue or a problem with device firmware.

    Consistently, if I start the Weather sample, it works 3-4 times perfectly fine, but the next time (and every time thereafter) it just displays "Waiting for GPS". The other thing I noticed is that the attempt immediately before the app gets stuck waiting for GPS, it does not display the "Wait for GPS" banner, whereas the rest of the time it does. This happens if, and only if, I do not allow the watch to acquire GPS when it first boots (at which point it's in the activity menu).

    If I go into an activity (like Run) after the Weather sample fails to acquire and allow the watch to acquire GPS, then return to the weather sample, it works fine after that without any other issues.

    Is this consistent with what you're seeing Rupert?
  • I was able to reproduce this issue, so I'll get it reported. I don't think it's a problem with the weather sample specifically, but it could be a Connect IQ issue or a problem with device firmware.

    Consistently, if I start the Weather sample, it works 3-4 times perfectly fine, but the next time (and every time thereafter) it just displays "Waiting for GPS". The other thing I noticed is that the attempt immediately before the app gets stuck waiting for GPS, it does not display the "Wait for GPS" banner, whereas the rest of the time it does. This happens if, and only if, I do not allow the watch to acquire GPS when it first boots (at which point it's in the activity menu).

    If I go into an activity (like Run) after the Weather sample fails to acquire and allow the watch to acquire GPS, then return to the weather sample, it works fine after that without any other issues.

    Is this consistent with what you're seeing Rupert?


    First off thank you for trying. Yes it is, but it might just be a 920 and Epix issue, not VA. I think the only safe way at the moment is not to call out to the GPS and just hope thst the last postition is correct.

    If you couls fix the get gps routine then it could work like this...

    1) call out for gps and pass in the call back function.
    2) the call back function then uses the position data (either fresh or from a last know pos) and calls the next function to get json etc

    THANKS!
  • @Rupert - a ciq_log.txt file from your app seemed to show multiple "onPosition" calls with a one-shot for GPS on the 920

    Could you verify? That might be a big hint in getting this fixed - I only see one onPosition with the va.