voice.svcFinished - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki
gigagenie.voice.svcFinished
API 설명
- 서비스 종료 API
- 음성 명령(닫기)이나 리모컨 나가기 키에 의한 서비스 종료 요청을 수신하거나 화면상의 '닫기' 버튼 클릭 시 자체 종료 처리(ex: 앱 세션 정리)를 진행하고 종료한다. 종료 요청을 수신하고 자체 종료 처리 후 서비스 종료 API를 명시적으로 호출해 주어야 해당 서비스가 종료된다.
- 종료시
options.returnParent
를 설정하면 RunApp
으로 실행된 경우 RunApp
을 호출한 이전 앱의 actionCode
로 다시 호출해준다.
API 구조
- function svcFinished(options,callback)
options
returnParent
: (Boolean, Optional) RunApp
에 의해 호출된 앱일 경우 종료 후 호출한 앱을 재실행함 (gigagenie.init.runApp 에서 설정한 callbackParameter
로 파라미터 전달)
result_cd
extra
사용 예시
// callback
var options = {};
options.returnParent = true;
gigagenie.voice.svcFinished(options, function (result_cd, result_msg, extra) {
if (result_cd === 200) {
console.log("service finish request");
}
});