How to uniquely identify Vivoactive 5 device

Hi,

I have developed a couple of apps and a watchface that supports a wide variety of device types (starting with the likes of the Fenix 6, Vivoactive 3 etc up to the most recent devices) and have just received a user request to make it available for the Vivoactive 5.  

At the moment I have an internal switch which identifies which version of Monkey C the device supports which dictates which type of graphics calls I use (for later devices I use things like scaled bitmaps rather than drawing the objects to improve the layout presentation).  Unfortunately from what I can work out the Vivoactive 5 supports v4.2.0 but not some of the specific dc calls such as the scaled bitmap etc which means I can't rely on Monkey C version alone.  I've then looked at other factors, such as display size etc, and can't find anything that uniquely distinguishes it from other device types running v4.2.0+.

Has anyone else had this issue and found a way around it?


Thanks

  • Well just give any example, any example of what you do. Without code annotations to pull in different bits of code for different devices.

  • In most cases, I use "has" as the amount of code is minimal. With Jungles, I use different settings for B&W devices vs color, and also to include the XML needed when publishing complications, but which can't be included for devices that don't support complications.  One widget for example, that supports devices back to the original va, that can publish complications that supports color and B&W (Instincts) devices does both.

    How much have you used Jungles?  Or "has"?

  • Not a lot other than including or excluding different versions of code or resources for different device family qualifiers. Hence I asked you for an example that meets the OPs use case that isn’t using inclusions and / or exclusions..  Sounds like you’re just including or excluding things like the rest of us.  You have core code then additional parts pulled in (or not) based on various qualifiers.

  • As I said I mainly use "has" and not including/excluding stuff.  Here's a case where I use different files based on if a device has native map support by using Jungles.  It only shows the first couple devices.

    base.sourcePath=$(srcBase);source-nomaps
    base.resourcePath=$(resBase)
    
    # tested with maps
    fenix5x.sourcePath = $(srcBase);source-maps
    fenix5x.resourcePath = $(resBase);resources-maps
    
    fenix5plus.sourcePath= $(srcBase);source-maps
    fenix5plus.resourcePath = $(resBase);resources-maps

    I'm really not sure what you are looking for.

  • Yes has works for simple use cases

  • It also works for complex cases, but I tend to keep my jungle files simple, but use "has" quite a bit.

    In the same app with maps/no-maps, I also have this in the Jungle file.  I use screen buttons on the Oregon and Rino devices

    base.excludeAnnotations=useScreenButton
    oregon7xx.excludeAnnotations=noScreenButton
    rino7xx.excludeAnnotations=noScreenButton

    And here, I include different common code based on what the app uses:

    srcBase=source
    resBase=resources
    
    #barrels background
    barBgWu=..\BgWu
    barBgOWM=..\BgOWM
    barBgSettings=..\BgSettings
    
    #barels misc
    barSenHist=../SenHisMisc
    
    #barrels clocks.
    barClkGoals=..\ClockGoals
    barClkFields=..\ClockFields
    barClkIcons=..\ClockIcons
    barClkMisc=..\ClockMisc
    barClkSettings=..\ClockSettings
    barClkSun=..\ClockSun
    
    #watchfaces, etc
    #using fields and sun
    #base.sourcePath=$(srcBase);$(barClkFields);$(barClkIcons);$(barClkMisc);$(barClkSettings);$(barClkSun)
    
    #using goals
    #base.sourcePath=$(srcBase);$(barClkGoals);$(barClkIcons);$(barClkMisc);$(barClkSettings)
    
    #Weather underground
    base.sourcePath=$(srcBase);$(barBgWu);$(barBgSettings)