Execution stops at setNumber() method of application-settings


I’m trying to save some data in my app using ‘application-settings’ module but when I use the setNumber() method, the execution just stops there without any errors in the console. The syntax is correct according to the docs. What could be the reason for this?

var settings = require("application-settings");
console.log(resultObj.data.id); // returns 9 (example id)
settings.setNumber("userId", resultObj.data.id);
console.log(resultObj.data.id); // don't get anything in the console here

  1. Which platform does this happen?
  2. Did you try verifying the typeof resultObj.data.id to make sure it’s actually a number?


I’m on android. You’re right. Its a string not a number. Converting it to number solved the problem. Thanks