save
Object
Method to save object to preference
Parameters
key
preference's name
value
preference's value