init.startFgAction - GiGAGenie-ServiceSDK/UserGuide GitHub Wiki

gigagenie.init.startFgAction (Deprecated)

API 설명

  • Foreground Action 실행 API
  • Background에서 실행중인 웹에서 Foreground action을 실행한다.

API 구조

  • function startFgAction(options,callback)
  • options
    • actionCode: (String, Optional) 실행할 actionCode
    • serviceOptions: (JSONObject, Optional) action 실행시 get parameter로 전달할 옵션
  • result_cd
    • 200: 시작 성공
    • 404: 존재하지 않는 actionCode
    • 405: Background 로 동작하는 actionCode아님
  • extra
    • null

사용 예시

// callback 방식
var options = {};
options.actionCode = "startForeground";
gigagenie.init.startFgAction(options, function (result_cd, result_msg, extra) {
    if (result_cd === 200) {
        console.log("Background Service Started");
    } else {
        console.log("startFgAction is fail.");
        console.log("result_cd: " + extra.result_cd);
    }
});