Ticket Created
over 4 years ago

WERETECH-11175

set/getProperty deprecate on sdk 4?

In current doc something has changed!!

Previous information: some function (e.g. deleteProperty) was planned to remove but not set/get.

My app run well and there are values in sim Application.AppBase.Data.

So, is documentation correct?

I have some strange app behaviour on sim:

- settings don't change

- memory peaks

- console  message "Unable to serialize app data"

- resetting settings to default

can be connected with any changes in sdk 4?

  • "- there is a lot getProperty call and I think it may be connected with it but why if this in app memory and it's loaded when app start:"

    I think it's more due to the size of all your properties (e.g. number of properties) and not the number of getProperty() calls.

    As far as I know, if you send settings the classic way (not on-device settings), then it's like temporarily having two copies of your properties in RAM, for a brief moment in time.

    Everything I said in my previous comment refers to off-device settings.

    I don't own a device with on-device settings and I've never used them, so I was unaware that onSettingsChanged() is called when settings are changed on the watch. (My understanding is that it isn't, but I can't be 100% sure.)

    developer.garmin.com/.../AppBase.html

    onSettingsChanged() as Void

    Called when the application settings have been changed by Garmin Connect Mobile (GCM) while while the app is running.

  • And next, when I choose [view] from sim
    - I can see mProperties (my data stored by setProperty). Can I assume that mProperties is always in memory and there is no peak reading it but simple use value from dictionary - if there is an error in sdk I can write may own function prevent it.
    - I can see also <Application Settings> - is it possible to access this data directly? It is Obj # 255 it should be somewhere variable.

  • And, if getProperty is deprecated how to read users's settings?

  • why i can't paste images in forum?

    sim - venu 2/2s

    - after reseting sim data my Application.AppBase.Data is empty

    - after using setProperty is filled, so on sim (sdk 4.1) everything run as previous

    I read doc a thousand times and remember about some deprecating function and not set/getProperty, nobody remove function from sdk without notice

    I don't have got venu 2/2s so I can't check if my wf run well on it, nobody noticed me that there is no data saved by setPropery but maybe nobody download my wf.

  • 1. I know that this is connected with low memory but I don't know why. This is for watch face.

    2. This happens when user change setting on watch and there is called app.onSettingsChanged so I can't close app because it's out of me. But not always, app run well I don't do anything and suddenly "Unable to serialize app data", what this error really mean, is connecting with settings?

    3. My onSettingsChanged
    - isn't big so  there should not be peak memory,
    - there is a lot getProperty call and I think it may be connected with it but why if this in app memory and it's loaded when app start: