"Leaking" of native apps

In my app I record user selected activity types.

...
if (session == null) {
session = Record.createSession({:name=>"Tabata", :sport=>prop_activity, :subSport=>prop_sub_activity});
}
...
session.start();


When recording an activity after a fresh install, native apps like "run" or "pool-swim" "leak" into my app.
In case of recording a run, when my app has triggered a recording session, a few seconds into the activity the "GPS Ready" from the nativ run app is popped up.
In case of recording a pool-swim, the whole native pool swim activity start pops over my app and stops my app recording session.

Is this some sort of bug in connectIQ or have I found some way starting native apps? :D
  • Former Member
    Former Member
    By trial and error I found out, that "GPS ready message" is given only after you create recording session even if signal was already aquired before you actually initialize recording.
    In my app I tried to create session after user pressed "Select" to start activity, but the GPS ready message popped up immediately messing with my own data and slowing screen update during in-out animations. Therefore I decided to create session the moment initial view is pushed, since this allows for a normal flow of events: when satellite signal is aquired, then message is shown for gps enabled session.

    Don't know about standard swimming app overlapping messing with your activity, though. This seems like SDK bug indeed.
  • Ah! Thanks for your answer. So creating the session object immediately is the trick. Will this also trigger the whole GPS overlay with signal strength etc? (I did my own implementation).
  • With a CIQ watch-app, you have to do everything yourself - such as fire up GPS and the sensors, adding laps, etc.

    By "leaking" to the native apps, it almost sounds like you've crashed and come back up in a native app (the recording file is still "open" and it doesn't restart CIQ apps at that point).

    One very common thing that causes watch-apps to crash is not checking for null values in Activity.Info before using them. You start the app and it crashes very soon after the recording starts... You can see this in the sim, but will see the nulls often when a CIQ watch app first starts.

    ciq_log.txt (while testing a sideload of a .prg with debug info) may also give you some info on what and where something happened.
  • jim_m_58, I'm 100% sure the app doesn't crash in the case of running and "GPS Ready", my counters kept on going and the activity was recorded just fine. The log file does not contain anything (I know it works). In the case of pool-swimming, my app just stopped (might have crashed but no !IQ). One important thing is, this only occurs on the very first time a specific activity type is used after loading the app onto the watch. Consecutive tries does not cause any issues...

    Regarding fire everything up your self, I have done this and for e.g. running all is recorded fine with pulse, distance etc. In the case of swimming, I get 0 distance or 8,800yds every second lap! To me this seems like some connectIQ bug or lack of function to record swimming...
  • which watch and what FW are you seeing this on?
  • I'd try updating to the current SDK (1.2.9) and also, as this seems to be a "first time" thing look at your code that deals with settings or the object store, as those values might get "fixed" after the first run of your app. I've found myself in the native app, but only after the CIQ watch-app crashed.
  • Former Member
    Former Member
    This is probably a device firmware issue in the Fenix3HR. These UI elements should not be appearing during ConnectIQ activities.