Session.AddLap Stops activity GPS & other funky issues w/ auto notification of LAP

Hi,

I am playing/testing with a custom built app and doing session.addlap at 1KM intervals. What I have noticed is that the during the times when session.addlap is executed, the following will occur.

Scene1
1) the AutoLap notification screen will come up. (this is a "bug" and per input prev from connectIQ guys - this should not be happening). When the AutoLap notification screen comes up, a few things happen

2) the AutoLap screen will take over the entire custom app. If i were to press the ESC (Could also be any other key) to dismiss the notification (much like how one can dismiss a SMS notification by pressing Up/Dn arrow key), I would in-advertently exit the custom app.

3) in my custom app code, the ESC key is used to either exit the app (only if there is no current recording session in progress) or to add a lap. In this case, when the autolap notification comes on, pressing the ESC key will EXIT the app and present me w/ the "save/discard" NATIVE dialog box. (not the custom save/discard dialog box I created). In this screen, it will show up as 0:00:00 min and _:__km ran or such.

4) when I click save/discard - I believe (i didn't verify in detail) that a new recording session is saved/discared (my custom app activity recording however is SAVED, I think even before this NATIVE save/discard dialog box comes up


Scene2
5) I have also noticed that doing session.addlap and during the instance when the autolap screen comes up, GPS will turn off. (I think. need ConnectIQ guys to verify based on the FIT file from the link)

6) Why I say this - when I look at the MyGPSfiles rendition of the route, I can see that at the autolap locations (each 1Km), I will see that the track will "break" apart and then the GPS track after that could "struggle" to get another GPS lock and end up possibly a drunkard.

In the pic below - you can see the "breaks"



Here's the link to myGPSFiles

http://www.mygpsfiles.com/app/#8szaGkUg

Please let me know if this is a known issue or something to do w/ my code or something to do w/ the Resume Later bug

F3. FW 3.6 GPS 2.9
  • Here is another link to another session.
    this time, I mistakenly forgotten to put the autolap at 1000m and instead it was at 100m.

    The "breaks" is even more apparent / worst here.

    http://www.mygpsfiles.com/app/#8tUrhvx0
  • Former Member
    Former Member over 10 years ago
    This sounds like a mess, we will investigate.

    Can you let me know what device and firmware version you are currently using.
  • F3. FW 3.6. GPS 2.9 (Per the first post)

    If u need the PRG file or the code, (I've actually emailed the link to you guys prev). But do let me know.
  • Former Member
    Former Member over 10 years ago
    Note that when the native lap banner appears, the onHide method will get called for your active View. Can you make sure you aren't disabling GPS notifications, or doing anything else that can cause issues in that method. If the version of your app that you previously sent is out of date, you can send it to the ConnectIQ mailbox again and it may help our investigation.
  • Note that when the native lap banner appears, the onHide method will get called for your active View. Can you make sure you aren't disabling GPS notifications, or doing anything else that can cause issues in that method. If the version of your app that you previously sent is out of date, you can send it to the ConnectIQ mailbox again and it may help our investigation.


    function onHide() { GPS.enableLocationEvents(GPS.LOCATION_DISABLE, method(:onPosition)); }


    yup. I have that there. I tot I was being a good cItizen to have that there (per example in the SDK).
    So, is it wrong to actually be doing that onHide() cos in this case I'm not within confines of my custom app? in this case, I'm getting kicked out of my custom app (and whatever custom views of my app) and exiting to cease control to another app (in this case the native notification banner) hence the issue?

    I'll send a new link but I've not progressed far in that app despite the best help from Travis. (My own lack of understanding of the MVC model which I'm still wrapping my head against)
  • Former Member
    Former Member over 10 years ago
    function onHide() { GPS.enableLocationEvents(GPS.LOCATION_DISABLE, method(:onPosition)); }


    yup. I have that there. I tot I was being a good cItizen to have that there (per example in the SDK).
    So, is it wrong to actually be doing that onHide() cos in this case I'm not within confines of my custom app? in this case, I'm getting kicked out of my custom app (and whatever custom views of my app) and exiting to cease control to another app (in this case the native notification banner) hence the issue?

    I'll send a new link but I've not progressed far in that app despite the best help from Travis. (My own lack of understanding of the MVC model which I'm still wrapping my head against)


    It is a good idea to disable GPS when you exit, but the onHide function isn't only called when a view is closed, but also if it is covered up by another view. The code you have in onStart and onStop to start and stop the GPS events should be sufficient.

    I'll check the sample and see if we should modify it to better handle this situation.
  • Former Member
    Former Member over 10 years ago
    Nikeow,

    We are unable to reproduce any app exits when dismissing the native lap banner while running your app. After pressing lap and triggering the native lap page, we are seeing the following behavior:
    Pressing lap again creates another lap.
    Pressing up or down clears the lap screen immediately.

    We are looking into what is required to fix the issue that is causing the native lap page to appear at all, but can't find any other issues with the behavior.
  • Brian - on the addLap() and the native "lap" display, could this be an option, as I have an app that uses addLap(), and find I like getting the lap screen.

    Maybe something like "addLap(showLapScreen)" ?
  • Did a VERY short test run after removing the onHide() and it seems to have made things better. I'll report back more as I run more. (On hindsight - i should have just made the laps shorter)


    On the other hand - w/ regards to pressing the ESC button after the AutoLap banner comes on, I was mistaken, it is not pressing the LAP/ESC button that triggered it. (that's #2 lap in the above pic)
    I did another simple testing and it seems like it it is pressing the START/STOP button. Here' the weird part.

    in my custom app, i put the sub sport as STREET RUNNING (vs native app which I believe just do SUB_RUNNING), so, when I look at the session which was saved from AFTER pressing START/STOP (to dismiss the auto lap banner), it is coming out as STREET RUNNING sub sport. This may mean (I speculating) that my custom app is still running and pressing the start/stop is still triggering the right behaviour (which is to stop / pause the session) BUT

    1) Why is it showing the NATIVE save/discard dialog instead of my custom one (There is a difference cause of the header. i use SAVE/Discard? vs the Native which does the xxxKM and xxx Time)
    2) if I select resume (event) when the NAVTIVE start dialog comes up, i get thrown into a native app (i can't tell which app it is, but it's native and cos it shows me a 3 line layout (which I do not have installed in any of my native app data page) showing LAP TIME and TIMER and something I can't remember)
    3) If I stop this app then, do a SAVE, it ends up saved into GC as "Street running"

    it's clear that something else is happening. It's caching the previous SUB_SPORT?

    I'll test more but I can only test it when I get a chance to do GPS and outdoor runs.