widget and UII.BehaviorDelegate

I've reported bug

https://forums.garmin.com/developer/connect-iq/i/bug-reports/behaviordelegate-doesn-t-work-on-sim-some-devices

but....

I have standard code in PSX-7

(:glance)
class PSX7App extends APP.AppBase
{
    //...
    function getInitialView()
    {
        return [new PSXView(), new PSXDelegate()];
    }
        
    function getGlanceView()
    {
        return [new PSXGlanceView()];
    }  
}

and using 4.1.7 in main view up/down buttons work on sim

- always well - for some devices (e.g. f7 maybe all 4.0)

- for older one (e.g my f6p)  only when launched from the glance

- one user tries tu use my PSX-7 widget on f5x and no up/down events - it exit and changes widget

The same user with f5x claims up/down runs well in psx-4 but in psx-4

- no (:glance) annotation (all app is loaded in glance)

- built with 4.1.5 (but when I testing now from 4.1.4 all runs bad)

So should I handle something in different way? Maybe for devices with no glance should be app no widget (in watch-app everything runs well in sim).

  • onMenu()

    onSelect()

    is called

    when in input example change app type from app to widget it doesn't handle up/down buttons

  • You're describing how widgets work on any device without glances and always have.  Without a glance, up/down take you through the widget loop.  On devices with glances, up/down take you through the glance loop when you are viewing glances, but can be used when in full screen when started from a glance.

    You can tell how you were started when in full screen with System.isGlanceModeEnabled

    If that's false, or if the device doesn't have that, what you need to do is push a second view, with it's own delegate to use up/down.

    It's not a bug.

  • User has sent me a video, he

    - going to widget list - I can see my icon

    - pressing enter - I can see full view

    - pressing up - next widget - it means full view is treated as a part of widget?

    ok, I'll check glancemode, so is it possible to push view automaticity from any place or I should use timer to do it? 

  • As I said, before glances this is how widgets always worked.  You need to push a second view to use up/down.  And on devices like the f6, having glances is optional.

    Search this forum for "widget up" to see a number of threads about this topic.

  • ok, I've switch off glance preview on my f6 and it behaves the same "wrong" but by design way 

  • Maybe it is not bug but bad design I could always return false from delegate to inform move to next widget...

    And consequence of bad design is such behaviour when no glance

    - watch face

    - pressing up

    - for the moment system shows widget list than automaticity main view for first widget

    - app starts

    - back

    - watch face

    and should be

    - watch face

    - pressing up

    - always widget list or glance

    - pressing select, system shows the main view for selected widget

    - app starts up/down runs

    - back

    - always widget list or glance

    - back

    - watch face

    but probably all this was realised in 4.0 "super apps"

  • This is the way things worked long before anyone thought of glances, and it makes complete sense to me - as someone that's done widgets for years. (and I sure don't want to go back and change those.)

    Without glances, the FW has to be the one to handle up/down, so a user can move through the widget loop.  Otherwise, they would get stuck on a widget.  And there is an easy and long time method to allow for up/down - pushing a second view.  This is what happens when you push something like a menu/menu2 in a widget

  • To have up/down I have to dev 2 next classes and some more code, what on system where memory is "unlimited"  is no any problem...

  • This all may be new to you, but input in widgets has been discussed here for 8 years and a simple search finds those threads.  It will not change - of that I'm sure as it is a big deal only for devices without glances or where glances are optional, like the f6.  If you don't want a bit more code, just don't support those devices for your widget.  It's up to you.

  • And maybe this the answer to the question of whether is well designed... As for 8 years many devs have been surprised it (and report bugs), it means that is "a bit" different they expect.