device


getDeviceInfo

디바이스의 정보를 얻어온다.

successCallback

필드설명
apiVerapi set version (예: 0.0.1)
uuid디바이스를 구별할 수 있는 유일한 ID값 (예: ab65507c2511a1df)
modelName디바이스 모델명 (예: SHW-M250S)
platformName플랫폼명 (예: Android)
platformVersion     플랫폼 버전 (예: 2.6.4)
targetDeviceTypepreConfiguration.json 내의 targetDeviceType 값 반환 (예: All)
  

errorCallback

필드설명
없음없음
  

Example

hone.channel.execute('Device', 'getDeviceInfo',
    [],
   function (apiVer, uuid, modelName, platformName, platformVersion, targetDeviceType) {
       // success callback
   },
   function (e) {
       // error callback
       alert(JSON.stringify(e));
    }
);

Result

인자 에 해당하는 값을 반환 한다. 


getAppInfo

현재 사용중인 앱에 대한 정보와 설치된 비즈앱들에 대한 정보를 얻어 온다.

successCallback

필드필드필드설명
result  앱 및 비즈앱 정보
app {object} 앱정보
version앱 버젼 (예: 1.5)
appId앱 아이디 (예: HoneMobileDemo)
launcherAppVersion 런처앱버젼 (예: 420)
bizapps [array] 비즈앱정보
bizappId비즈앱 아이디 (예: common)
title비즈앱 타이틀 (예: Hone Mobile Settings)
version비즈앱 버젼 (예: 1.0.0) 
    

errorCallback

필드설명
없음없음
  

Example

hone.channel.execute('Device', 'getAppInfo',
    [],
   function (result) {
       // success callback
       alert(JSON.stringify(result));
    },
   function (e) {
       // error callback
       alert(JSON.stringify(e));
    }
);

Result

{
   "app": {
       "appId": "DEMO",
       "version": "1.0.0"
    },
   "bizapps": [{
       "bizappId": "main",
       "title": "BizApp",
       "version": "2.8.1"
    }, {
       "bizappId": "sub",
       "title": "BizApp",
       "version": "2.8.1"
    }, {
       "bizappId": "common",
       "title": "Common Library",
       "version": "2.0.5"
    }, {
       "bizappId": "bizcommon",
       "title": "Business Common Library",
       "version": "2.0.2"
    }],
   "launcherAppVersion": "0"
}

getNetworkInfo

네트워크의 정보를 얻어온다.

successCallback

필드필드설명                
result 현재 연결된 네트워크 정보
type네트워크 정보 (3g, wifi)
   

errorCallback

필드설명
없음없음
  

Example

hone.channel.execute('Device', 'getNetworkInfo',
    [],
   function (result) {
       // success callback
       alert(JSON.stringify(result));
    },
   function (e) {
       // error callback
       alert(JSON.stringify(e));
    }
);

Result

{"type":"Wi-Fi"}

getLocale

현재 Locale을 반환한다.

successCallback

필드필드설명
result 현재 지역 정보
country지역(국가)
language언어
   

errorCallback

필드설명
없음없음
  

Example

hone.channel.execute('Device', 'getLocale',
    [],
   function (result) {
       // success callback
       alert(JSON.stringify(result));
    },
   function (e) {
       // error callback
       alert(JSON.stringify(e));
    }
);

Result

{
   "country": "US",
   "language": "en"
}