code: function (key, value, dict) {
  	    	var deferred = $q.defer();
  	    	var promise = deferred.promise;
              
              function ok(value){
                  deferred.resolve(value);
              }
              
              function errorCallback(error){
                  deferred.reject(new Error(error));
              }
              
              if($window.plugins){
                  var storeResult;
                  if(arguments.length === 3){
                      storeResult = $window.plugins.appPreferences.store(dict, key, value);
                  } else {
                      storeResult = $window.plugins.appPreferences.store(key, value);
                  }
                  
                  storeResult.then(ok, errorCallback);
              } else {
                  deferred.reject(new Error(this.pluginNotEnabledMessage));
              }
              
  	    	this.decoratePromise(promise);
  	    	return promise;
  	    }
docs: Store the value of the given dictionary and key.
  @param key The key of the preference.
  @param value The value to set.
  @param dict The dictionary. It's optional.
  @returns Returns a promise.