NativeBridgeDataSource.getDeviceInfo = function () {
  if (typeof android != "undefined") {
    return JSON.parse(android.getDeviceInfo());
  } else {
    return JSON.parse(callNativeApp(NATIVE_KEY_IOS.getDeviceInfo, {}));
  }
};

function DeviceInfo(deviceInfo) {
  this.isMoble = deviceInfo.isMoble;
  this.platform = deviceInfo.platform;
  if (typeof android != "undefined") {
    this.androidVersion = android.getAndroidVersion();
  }
}

DeviceInfo.prototype.isiOS = function () {
  return this.platform == "ios";
};

DeviceInfo.prototype.isAndroid = function () {
  return this.platform == "android";
};

DeviceInfo.prototype.isMobile = function () {
  return this.isMoble == true;
};

var deviceInfo = new DeviceInfo(NativeBridgeDataSource.getDeviceInfo());

// WARN:: this variable is only for use in coview. and should request not to use this.
var isIos = deviceInfo.isiOS();
