Preferences are deleted when code is changed

Preferences are deleted when code is changed

BY 21 Jan 2014 Web Application Development

Hi.

For example, launching app including below code,

    console.log(widget.preferences.getItem(“test”));
    widget.preferences.setItem(“test”, “aaa”);
    console.log(widget.preferences.getItem(“test”));

then console log is “null, aaa”. and launching again, console log is “aaa, aaa”

However, set preferences are deleted and  console log is “null, aaa” even if only slightly I change code (e.g removing one empty line).

Is this a default behavior? How can I config not to delete preferences when changing code

 

Written by