I'd like a notification that WatchUi.animate won't complete

I added a simple WatchUi.Text animation to my glance view.  No animation updates occur when simulating a Fenix 6.  The animate callback is not invoked at any time.  In the simulator a Fenix 6 Pro does animate in the glance view.  I released an update to my widget that included this animation for Fenix 6 Pro's only.  A user wrote back that the animation aborted early.

I'd like to have some indication that the animation won't finish.  A flag in the callback, or just calling the callback would be sufficient so that I can take the appropriate action.

To test this, I copied my animation code to the main widget view and it works just fine on all watches in the simulator and on my own VA4.  So, I know it's not something with the code.  I did see the note in the programmers guide: 

Devices that have less memory [3] will start the app only when the system deems it appropriate, and calls to WatchUi.requestUpdate() will have no effect. Such a device could update the ‘Glance Page’ when it becomes visible (activated) and at least 30 seconds since last update.

Which I took to mean that the animate updates may not occur.  Is this expected behavior?

My Text Drawable:

remText = new Ui.Text({
:text => REMSTR+"xxx",
:color =>Gfx.COLOR_WHITE,
:font => MFONT,
:locX => 0,
:locY => Y
});

Animation start in onShow()

Ui.animate(remText, :locX, Ui.ANIM_TYPE_LINEAR, 0, -animStop, 3.0, method(:refresh) );

draw in onUpdate()

remText.draw(dc);

Parents
  • The Fenix 6 works differently than the f6 pro in glance mode (same with all the non-pro f6's and the pro versions).

    As you see in the programmers's guide, things like Ui.reqestUpdate() aren't honored on the f6.  In devices.xml you can see the difference with the 

    <glance live_update="false">

    setting for a device

  • Yes, but the question remains.  If the animate cannot finish, I think the callback should be invoked.  This is particularly problematic for devices, like Fenix 6 Pro, that work fine on simulator, but don't complete a simple animation in glance.  Might as well make a statement that animation is not supported in a glance view.

  • What do you mean "doesn't finish"?  It just stops in the sim?  LIke I said, it will likely be different between the f6 and f6 pro in the sim. as the glance live_update is different between the two.

    When you say it works in the sim for the f6 pro, is that when the widget in in glance view or full screen?

  • Fenix 6 performs no onUpdate's in sim, Fenix 6 Pro device performs some onUpdate's, Fenix 6 Pro sim completes animation w/ callback.  The others do not invoke the callback.  So, there is no indication that the animation did not complete.

  • The lack of onUpdate calls on the f6 is expected, and it gets back to the live_update flag I've mentioned.  See "Glance Lifecycle" in the programmer's Guide 

    The fix is really just don't do animations on devices where live_update is false.

    I'm not sure how "won't finish" would be detected.

  • If the system invoked the callback when it could not complete the animation within the constraints then the controlling program can take appropriate steps.   I'm suggesting that is a better flow than no indication of aborted animation.  Focus more on the Fenix 6 Pro device, which should complete the animation, but does not.  However, this new flow could also help all cases where the animation did not complete.

  • If it doesn't complete, there's probably not much the app can do, as in glance mode it's about the live_updates true/false, which is defined by device.  Per what you said, it runs fine of the f6 pro (live_update=true) but not on the f6 (live_update=false).

    You're best solution is to not try to do it on devices with live_update=false, and using jungles, your app can tell what device it's running on.

    I kind of wonder how well this will work on actual devices in glance view with live_update=true, and if it will impact scrolling.  See this blog post about some glance tricks:

    https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/widget-glances---a-new-way-to-present-your-data

  • I understand that.  That is what I did. And the real device only partially animates.  That is the problem. Animate has an unfulfilled promise, i.e. the callback.  I don't believe that is how it should be architected.

  • To me, the issue isn't the lack of a callback, it's why it stalls in a glance view on the device.  Per your code, looks like you have a period of 3 seconds, but how often is the screen being updated?  Per the "glance lifecycle" section in the programmer's guide, you want to keep that at 1 sec or greater even if live_update=true. 

    You might just be doing something that's really not suited for a glance view. 

  • If you want Garmin to take a look at why the animation isn't completing, submit a sample app with the steps/environment to re-create it in the CIQ Bug report forum.

Reply Children
No Data