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?

  • "Is it this questions to me?"

    No, I was quoting 's question and replying to them.

    The UX of these forums (especially the bug reports forums) is so bad.

  • Is it this questions to me?

  • "Sorry for stealing the thread, but I also just noticed that getProperty and setProperty are being deprecated. Does that mean you cannot use them and if so, what other mechanism is there to replace them. I am relying on these functions in all my apps to save app data."

    See: developer.garmin.com/.../

  • Sorry for stealing the thread, but I also just noticed that getProperty and setProperty are being deprecated. Does that mean you cannot use them and if so, what other mechanism is there to replace them. I am relying on these functions in all my apps to save app data.    

  • o time I have enough memory (especially you suggest class, members and consumption memory too)  I prefer not to mix in jungle, my solution:

        function setPrp(k, v)
        {
            if(APP has :Storage)
            {
                APP.Storage.setValue(k, v);
            }else
            {
                APP.getApp().setProperty(k, v);
            }
        }
        
        function getPrp(k)
        {
            if(APP has :Storage)
            {
                return APP.Storage.getValue(k);
            }else
            {
                return APP.getApp().getProperty(k);
            }
        }