preference


set

네이티브에 key, value 값을 저장한다.

options

필드설명M/O
key키 값M
value저장할 값O
   

successCallback

필드설명
없음없음
  

errorCallback

필드설명
code에러코드
message에러메세지
  

Example

var key = 'key';
var value = 'value';

hone.channel.execute('preference', 'set', [key, value],
   function() {
       // success callback
   },
   function(e) {
       // error callback
       alert(JSON.stringify(e));
    }
);

get

네이티브로부터 key에 해당하는 값을 호출한다

options

필드설명M/O
key키 값M
value기본 값O
   

successCallback

필드설명
resultkey 에 해당하는 값
  

errorCallback

필드설명
code에러코드
message에러메세지
  

Example

var key = 'key';
var defaultValue = '';

hone.channel.execute('preference', 'get', [key, defaultValue],
   function(result) {
       // success callback
       alert(result);
    },
   function(e) {
       // error callback
       alert(JSON.stringify(e));
    }
);

Result

결과는 요청한 키에 해당하는 값이 문자열로 전달 된다.

"값"

remove

네이티브에 key에 해당하는 값을 삭제한다.

options

필드설명M/O
key키 값M
   

successCallback

필드설명
없음없음
  

errorCallback

필드설명
code에러코드
message에러메세지
  

Example

var key = 'key';

hone.channel.execute('preference', 'remove', [key],
   function() {
       // success callback
   },
   function(e) {
       // error callback
       alert(JSON.stringify(e));
    }
);

Error Code

CodeCauseComment
E10700파라메터 값이 잘못되어 있을 경우 
E10701전달된 액션 값이 알 수 없는 액션일 경우 
E10702키 값이 잘못되어 있을 경우 
E10750실행 중 오류가 발생 되었을 경우 
E10751삭제 시 키 값이 존재하지 않는 경우 
E10799알 수 없는 오류가 발생 되었을 경우