Acknowledged

ActivityRecording createSession name=> not working in SDK 4

I have a problem with "name". This was working until I updated with SDK 4. Working with SDK 4.2.2 here's my code:

mSession = ActivityRecording.createSession(
{:name=>"Pickleball",
:sport=>ActivityRecording.SPORT_TENNIS});

The activity name used to be Pickleball now it is Tennis.

 I also noticed the compiler says SPORT_TENNIS has been depreciated. There is no indication in the API documentation about this? I tried changing it to SPORT_GENERIC and the compiler again says the label is depreciated. However when I run it the name is Pickleball. Seems like a bug to me. When will this be fixed?

  • In web based Garmin Connect, click on "profile and account" (your profile picture on the upper right), Account Settings, then Display Preferences

  • I can't find where to make the workout name to device name change. Can you provide more direction or a screen capture? Thanks.

  • I charged up my va3, sideloaded my version of the record sample with "Pickles" and SPORT_TENNIS and recorded a short activity.  The va3 is paired with a test account, and when synced, it had a name of tennis.

    I changed the setting in gc for the taest account from workout name to device name.  That first activity was still named Tennis.  I recorded a second activity, and after syncing, the second one is named "pickles", while the first is "tennis".

    changing the setting for the display of the name only impacts activities synced after the change.

    Try changing the setting in GC and then sync a new activity.

  • OK can you tell me what I'm doing wrong in this code?

    function initialize() {
            //System.println( "->PSKApp initialize()" );
            AppBase.initialize();
            try {                //01
             
                  mSession = ActivityRecording.createSession(
               {:name=>"Pickleball",   
                :sport=>ActivityRecording.SPORT_TENNIS});
            }
            catch(e) {
                System.println(e.getErrorMessage());
            }
            //System.println( "<-PSKApp initialize()" );
        }

    Building in Eclipse:

    BUILD: C:\Program Files\Java\jre1.8.0_333\bin\java -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar C:\Users\Jen7\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-4.2.2-2023-03-09-6ec276508\bin\monkeybrains.jar -o C:\Users\Jen7\eclipse-workspace\PickleballScoreKeeper\bin\PickleballScoreKeeper.prg -w -y C:\Users\Jen7\MyGarmin\developer_key -d vivoactive3_sim -s 3.0.0 -f C:\Users\Jen7\eclipse-workspace\PickleballScoreKeeper\monkey.jungle

    BUILD: WARNING: The command line option -s is deprecated and will be ignored. Use command line option: -c.
    BUILD: WARNING: vivoactive3: The launcher icon (26x25) isn't compatible with the specified launcher icon size of the device 'vivoactive3' (40x33). Image will be scaled to the target size.
    BUILD: WARNING: vivoactive3: C:\Users\Jen7\eclipse-workspace\PickleballScoreKeeper\source\PickleballScoreKeeperApp.mc:24,14: '$.Toybox.ActivityRecording.SPORT_TENNIS' is deprecated.