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);
    }
});