Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

settings not working

HI I have had quite a few users suddenly start telling me the settings to save colours is not working.

it seems like it is new install. for some if they install a different face and reinstall mine again it works.

im not sure what i can do as it seem if it installs ok it works fine ?

 

 

Best Answer
0 Votes
12 REPLIES 12

can anyone suggest anything ? i am using the code used by many on here where it saves the file. is there any changes in the new sdk that would break this perhaps ?

Best Answer
0 Votes

It's possible something has changed, but it's not supposed to have. It's hard to say what's wrong without seeing some code.

Best Answer
0 Votes

here is some of the settings code. i cant replicate it as it works fine on my watch plus others i know who have a iconic and versa.

 

 

// Received message containing settings data
messaging.peerSocket.addEventListener("message", function(evt) {
  settings[evt.data.key] = evt.data.value;
  onsettingschange(settings);
})

// Register for the unload event
me.addEventListener("unload", saveSettings);

// Load settings from filesystem
function loadSettings() {
  try {
    return fs.readFileSync(SETTINGS_FILE, SETTINGS_TYPE);
  } catch (ex) {
    return {};
  }
}

// Save settings to the filesystem
function saveSettings() {
  fs.writeFileSync(SETTINGS_FILE, settings, SETTINGS_TYPE);
}  


const SETTINGS_TYPE = "cbor";
const SETTINGS_FILE = "settings.cbor";

let settings = loadSettings();
onsettingschange(settings);

 

 

function mySettings(props) {
  return (
    <Page>
      {options.map(([title, settingsKey]) =>
        <Section
          title={title}>
          <ColorSelect
            settingsKey={settingsKey}
            colors={colorSet} />
        </Section>
      )}
    </Page>
  );
}

registerSettingsPage(mySettings);

 

Best Answer
0 Votes

There was a bug with file transfer on iOS and that's just been fixed in 2.88, might be worth asking users to update if they haven't.

Best Answer
0 Votes

Thanks ill let them know and see what the report back.

is there somewhere i can check for the latest bugs / issues ?

Best Answer
0 Votes

HI again, unfortunately this is still an issue and it seem to be getting worse as i am getting more emails about this. They are telling me this is happening on other clock faces as well and not just mine. soime say even after reinstalling and shutting down and starting again it doesnt solve the issue. some are saying after a period of time they settings are resetting. it seems to be with how the clock face installs the file to save the settings to but i have no idea what i can do and i cant replicate it.

Best Answer
0 Votes

Perhaps try saving the values when they are received, rather than the unload event. Perhaps it's taking longer than expected and the app is getting terminated before the file is written?

Best Answer
0 Votes

Hi Jon,

 

i changed when the data was saved but it is still an issue.

i think there is something going on when the file is installed perhaps ?

Do we have any other examples of saving the settings file ?

Best Answer
0 Votes

Since the latest firmware update ive had 20 support requests about the settings not saving.

They are still saying that they have the same issue on other clock faces.

 

i have different comments such as it will randomly revert back to the default colours to it simply wont save at all.

 

there must be something different that is causing this ? is anyone else experiencing the same thing ?

 

Best Answer
0 Votes

Which clock has this problem? Can you find out information from the affected users?

 

Which phone & OS version

Which Fitbit mobile app version

Which Fitbit device & firmware version

Best Answer
0 Votes

I have had the same issue with my MED ID app since the new 4.0 OS. The code that I have used to save to the device since v.1.0 suddenly stopped saving on it seems new installs. Re-mediated the code twice and was rejected because it would save on my devices but not the Fitbit test devices. Can't be coincidence....

 

See my thread....

https://community.fitbit.com/t5/SDK-Development/data-persistence-assistance-needed/m-p/3942343#M1048...

Best Answer
0 Votes

Yes seems like we have the same issue, the default code doesn't persist anymore. The example guides need updating too. 

I've seen your post can you share what you used? 

Best Answer
0 Votes