notice


notice는 2.6.4 버전 이상 부터 제공되며 해당 라이브러리를 추가하여 사용해야 된다.

get

공지사항 정보를 서버로부터 받아온다.

 

successCallback

필드필드필드설명
result  공지사항 상세 정보
noticeInfosid공지사항 인덱스
launcherAppId앱 아이디
title공지사항 제목
type공지사항 타입 (image/text)
priority공지사항 레벨 (high/normal/low)
url공지사항 경로
imagePath공지사항 이미지 경로
startDate기재 시작 날짜 (Timestamp 기준)
endDate기재 종료 날짜 (Timestamp 기준)
content공지사항 내용
    

errorCallback

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

Example

hone.channel.execute('notice', 'get', [],
     function (result) {
        alert("size: " + result.noticeInfos.length + "\n" + JSON.stringify(result));
      }, function (e) {
        alert(JSON.stringify(e));
      }
);

Result

{
   "noticeInfos": [{
       "endDate": 1500390000000,
       "imagePath": "https://hone.hanwha.co.kr/smartop/download?type=noticeImage&imageName=1487123771526_dog.png",
       "id": "302",
       "title": "행운 이벤트 안내",
       "type": "image",
       "priority": "normal",
       "launcherAppId": "MobileCenter",
       "url": null,
       "startDate": 1487084400000,
       "content": null
    }, {
       "endDate": 1494367200000,
       "imagePath": null,
       "id": "301",
       "title": "시스템 정기점검 안내",
       "type": "text",
       "priority": "high",
       "launcherAppId": "MobileCenter",
       "url": "http://hanwha.co.kr",
       "startDate": 1487106000000,
       "content": "오전 2시 부터 6시까지 시스템 정기점검을 진행합니다."
    }]
}

show

공지사항 화면을 출력한다.

 

successCallback

필드설명
없음없음
  

errorCallback

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

Example

hone.channel.execute('notice', 'show', [],
     function (result) {
        console.log("notice ok")
      }, function (e) {
        alert(JSON.stringify(e));
      }
);

Error Code

CodeCauseComment
E11100파라메터 값이 잘못되어 있을 경우 
E11101전달된 액션 값이 알 수 없는 액션일 경우 
E11150실행 중 오류가 발생 되었을 경우 
E11151서버로 부터 전달받은 응답 메시지가 없는 경우 
E11152서버로 부터 전달받은 응답 메시지가 잘못되어 있는 경우 
E11199알 수없는 오류가 발생 되었을 경우