init.onBgCall - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.init.onBgCall (Deprecated)

API 설명

  • Background 함수 호출 등록 API
  • init.bgCall 에서 호출되기 위한 Background Action의 함수를 Background Action에 등록함

API 구조

  • function callback(operation,parameters)
  • init.bgCall을 호출할 때 설정한 값들이 전달됨

사용 예시

// callback 방식
gigagenie.init.onBgCall(function (operation, parameters) {
    switch (operation) {
        case 'Greeting':
            console.log("From " + parameters.myname + " Greeting");
            break;
        case 'Good Bye':
            console.log("From " + parameters.myname + " Good Bye");
            break;
        default:
            break;
    }
});