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

var DeviceInfo = class {
  isMoble; // iphone or iPad
  platform; // ios or android
  androidVersion;

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

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

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

  isMobile() {
    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();