How to use the react-native-device-info.getReadableVersion function in react-native-device-info

To help you get started, we’ve selected a few react-native-device-info examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github celo-org / celo-monorepo / packages / react-components / analytics / CeloAnalytics.tsx View on Github external
Brand: DeviceInfo.getBrand(),
    BuildNumber: DeviceInfo.getBuildNumber(),
    BundleId: DeviceInfo.getBundleId(),
    Carrier: await DeviceInfo.getCarrier(),
    DeviceId: DeviceInfo.getDeviceId(),
    DeviceName: await DeviceInfo.getDeviceName(), // NOTE(nitya) this might contain PII, monitor
    FirstInstallTime: await DeviceInfo.getFirstInstallTime(),
    FontScale: await DeviceInfo.getFontScale(),
    FreeDiskStorage: await DeviceInfo.getFreeDiskStorage(),
    InstallReferrer: await DeviceInfo.getInstallReferrer(),
    InstanceID: await DeviceInfo.getInstanceId(),
    LastUpdateTime: await DeviceInfo.getLastUpdateTime(),
    Manufacturer: await DeviceInfo.getManufacturer(),
    MaxMemory: await DeviceInfo.getMaxMemory(),
    Model: DeviceInfo.getModel(),
    ReadableVersion: DeviceInfo.getReadableVersion(),
    SerialNumber: await DeviceInfo.getSerialNumber(),
    SystemName: DeviceInfo.getSystemName(),
    SystemVersion: DeviceInfo.getSystemVersion(),
    TotalDiskCapacity: await DeviceInfo.getTotalDiskCapacity(),
    TotalMemory: await DeviceInfo.getTotalMemory(),
    UniqueID: DeviceInfo.getUniqueId(),
    UserAgent: await DeviceInfo.getUserAgent(),
    Version: DeviceInfo.getVersion(),
    isEmulator: await DeviceInfo.isEmulator(),
    isTablet: DeviceInfo.isTablet(),
  }
}
github BoostIO / boostnote-mobile / app / lib / AwsMobileAnalytics.js View on Github external
const AWS = require('aws-sdk/dist/aws-sdk-react-native')
const AMA = require('react-native-aws-mobile-analytics')
const DeviceInfo = require('react-native-device-info')
import settings from '../config/settings'

AWS.config.region = settings.awsRegion
AWS.config.credentials = new AWS.CognitoIdentityCredentials({
  region: settings.awsRegion,
  IdentityPoolId: settings.awsIdentityPoolId
})
const mobileAnalyticsClient = new AMA.default.Manager({
  appId: settings.awsAppId,
  appTitle: settings.awsTitle,
  appVersionName: DeviceInfo.getReadableVersion(),
  make: DeviceInfo.getManufacturer(),
  model: DeviceInfo.getModel(),
  platform: convertPlatformName(DeviceInfo.getSystemName()),
  platformVersion: DeviceInfo.getSystemVersion()
})

function initAwsMobileAnalytics () {
  mobileAnalyticsClient.initialize(() => {
    console.log('Cognito Identity ID: ' + AWS.config.credentials.params.IdentityPoolId)
    recordDynamicCustomEvent('APP_STARTED')
  })
}

function recordDynamicCustomEvent (type) {
  mobileAnalyticsClient.recordEvent(type)
}
github demokratie-live / democracy-client / src / screens / About / index.js View on Github external
render() {
    const version = `Version: ${DeviceInfo.getReadableVersion()
      .split('.')
      .slice(0, 3)
      .join('.')} (${DeviceInfo.getBuildNumber()})`;
    return (
github crownstone / CrownstoneApp / js / cloud / sections / bootloader.ts View on Github external
getLatestAvailableBootloader: function (background = true) {
    let appVersionArray = DeviceInfo.getReadableVersion().split(".");
    if (Array.isArray(appVersionArray) && appVersionArray.length >= 3) {
      let appVersion = appVersionArray[0] + '.' + appVersionArray[1] + '.' + appVersionArray[2];
      return cloudApiBase._setupRequest('GET', '/Bootloaders/latest?appVersion=' + appVersion, {background: background});
    }
    else {
      return new Promise((resolve, reject) => { reject("Can't get app version correctly."); })
    }
  },
};
github demokratie-live / democracy-client / src / screens / TermsOfUse / index.js View on Github external
render() {
    const version = `Version: ${DeviceInfo.getReadableVersion()
      .split('.')
      .slice(0, 3)
      .join('.')} (${DeviceInfo.getBuildNumber()})`;
    const linking = url => () => {
      Linking.canOpenURL(url).then(supported => {
        if (supported) {
          Linking.openURL(url).catch(() => null);
        } else {
          Alert.alert(
            'Nicht unterstützt',
            'Diese Operation wird auf Deinem Gerät zurzeit nicht unterstützt!',
            [{ text: 'OK' }],
            { cancelable: false },
          );
        }
      });
github react-native-community / react-native-device-info / example / App.js View on Github external
getConstantDeviceInfo() {
    let deviceJSON = {};

    deviceJSON.uniqueId = DeviceInfo.getUniqueId();
    deviceJSON.deviceId = DeviceInfo.getDeviceId();
    deviceJSON.bundleId = DeviceInfo.getBundleId();
    deviceJSON.systemName = DeviceInfo.getSystemName();
    deviceJSON.systemVersion = DeviceInfo.getSystemVersion();
    deviceJSON.version = DeviceInfo.getVersion();
    deviceJSON.readableVersion = DeviceInfo.getReadableVersion();
    deviceJSON.buildNumber = DeviceInfo.getBuildNumber();
    deviceJSON.isTablet = DeviceInfo.isTablet();
    deviceJSON.appName = DeviceInfo.getApplicationName();
    deviceJSON.brand = DeviceInfo.getBrand();
    deviceJSON.model = DeviceInfo.getModel();
    deviceJSON.deviceType = DeviceInfo.getDeviceType();

    return deviceJSON;
  }
github crownstone / CrownstoneApp / js / views / startupViews / LoginSplash.tsx View on Github external
width: 0.5*screenWidth,
              height:30,
              alignItems:'flex-start',
              justifyContent:'flex-end'
            }}
            onPress={() => { Linking.openURL('https://shop.crownstone.rocks/?launch=en&ref=http://crownstone.rocks/en/').catch(err => {}) }}>
            
          
          
        
      
    )
  }
}
github StoDevX / AAO-React-Native / source / views / settings / sections / support.js View on Github external
const getDeviceInfo = () => `

----- Please do not edit below here -----
${DeviceInfo.getBrand()} ${DeviceInfo.getModel()}
${DeviceInfo.getDeviceId()}
${DeviceInfo.getSystemName()} ${version}
${DeviceInfo.getReadableVersion()}
`
github StoDevX / AAO-React-Native / source / views / help / wifi-tools.js View on Github external
export const collectData = async () => ({
	id: deviceInfo.getUniqueID(),
	brand: deviceInfo.getBrand(),
	model: deviceInfo.getModel(),
	deviceKind: deviceInfo.getDeviceId(),
	os: deviceInfo.getSystemName(),
	osVersion: deviceInfo.getSystemVersion(),
	appVersion: deviceInfo.getReadableVersion(),
	jsVersion: pkg.version,
	ua: deviceInfo.getUserAgent(),
	ip: await getIpAddress(),
	dateRecorded: new Date().toJSON(),
})