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
์ฌ์ฉ ์์
// 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);
}
});