init.onFgCall - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.init.onFgCall (Deprecated)

API 설명

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

API 구조

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

사용 예시

// callback 방식
gigagenie.init.onFgCall(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;
    }
});