How to use the react-native-device-info.getSystemVersion 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 mongrov / roverz / example / src / app / config.js View on Github external
ModuleConfig.bootstrapUrl = 'roverz.mongrov.com';
    ModuleConfig.gaTrackingId = 'UA-110176262-1';
    ModuleConfig.init();
    ModuleConfig.setLogo(require('../images/logo.png'));  // eslint-disable-line global-require
    ModuleConfig.setNavLogo(require('../images/logo.png'));  // eslint-disable-line global-require
    ModuleConfig.setFilterRooms([
      'support', 'exceptions',
    ]);

    // set user agent
    let ua = ModuleConfig.appName;
    try {
      // Build user agent string
      ua = `${ModuleConfig.appName} ` +
        `${DeviceInfo.getVersion()}; ${DeviceInfo.getSystemName()}  ` +
        `${DeviceInfo.getSystemVersion()}; ${DeviceInfo.getBrand()} ` +
        `${DeviceInfo.getDeviceId()}`;
    } catch (e) {
      // do nothing
    }
    AppAPI.setUserAgent(ua);
  },
github transistorsoft / rn-background-geolocation-demo / SettingsService.js View on Github external
var SettingsService = (function() {
  var STORAGE_KEY = "@TSLocationManager:settings";

  // react-native-device-info
  var deviceInfo = {
    uuid: DeviceInfo.getUniqueID(),
    model: DeviceInfo.getModel(),
    platform: DeviceInfo.getSystemName(),
    manufacturer: DeviceInfo.getManufacturer(),
    version: DeviceInfo.getSystemVersion()
  };

	var _settings = {
    common: [
      {name: 'url', group: 'http', inputType: 'text', dataType: 'string', defaultValue: 'http://posttestserver.com/post.php?dir=ionic-cordova-background-geolocation'},
      {name: 'autoSync', group: 'http', dataType: 'boolean', inputType: 'select', values: [true, false], defaultValue: true},
      {name: 'batchSync', group: 'http', dataType: 'boolean', inputType: 'select', values: [true, false], defaultValue: false},
      {name: 'maxBatchSize', group: 'http', dataType: 'integer', inputType: 'select', values: [50, 100, 250, 500], defaultValue: 250},
      {name: 'stopOnTerminate', group: 'application', dataType: 'boolean', inputType: 'select', values: [true, false], defaultValue: true},
      {name: 'debug', group: 'application', dataType: 'boolean', inputType: 'select', values: [true, false], defaultValue: true},
      {name: 'stopAfterElapsedMinutes', group: 'geolocation', dataType: 'number', inputType: 'select', values: [0, 1, 2, 5, 10, 15], defaultValue: 0},
      {name: 'activityRecognitionInterval', group: 'activity recognition', dataType: 'integer', inputType: 'select', values: [0, 1000, 10000, 30000, 60000], defaultValue: 10000},
      {name: 'stopTimeout', group: 'activity recognition', dataType: 'integer', inputType: 'select', values: [0, 1, 5, 10, 15], defaultValue: 1},
      {name: 'disableElasticity', group: 'geolocation', dataType: 'boolean', inputType: 'select', values: [true, false], defaultValue: false},
    ],
    iOS: [
github lhr000lhr / wechat / Wechat / app / router.js View on Github external
...FindNavigator
  },
  {
    navigationOptions: {
      headerTintColor: 'white',
      headerStyle: {
        backgroundColor: '#38649F',
        ...Platform.select({
          android: {
            paddingTop:
              DeviceInfo.getSystemVersion() >= '5.0.0'
                ? StatusBar.currentHeight
                : 0,
            height:
              DeviceInfo.getSystemVersion() >= '5.0.0'
                ? 56 + StatusBar.currentHeight
                : 56
          }
        })
        //   height: 60 + StatusBar.currentHeight,
      },
      headerTruncatedBackTitle: '返回',
      headerPressColorAndroid: 'rgba(0,0,0,0.2)'
    },
    // headerMode: 'float'
    headerMode: Platform.OS === 'ios' ? 'screen' : 'float'
  }
)

const AppNavigator = StackNavigator(
  {
github celo-org / celo-monorepo / packages / react-components / analytics / CeloAnalytics.tsx View on Github external
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 mcnamee / react-native-starter-kit / src / lib / api.js View on Github external
import { AppConfig, ErrorMessages, APIConfig } from '@constants/';
import AppUtil from '@lib/util';

// We'll use JWT for API Authentication
// const Token = {};
const Token = new JWT();

// Config
const ENDPOINTS = APIConfig.endpoints;

let USER_AGENT;
try {
  // Build user agent string
  USER_AGENT = `${AppConfig.appName} ` +
    `${DeviceInfo.getVersion()}; ${DeviceInfo.getSystemName()}  ` +
    `${DeviceInfo.getSystemVersion()}; ${DeviceInfo.getBrand()} ` +
    `${DeviceInfo.getDeviceId()}`;
} catch (e) {
  USER_AGENT = `${AppConfig.appName}`;
}

// Enable debug output when in Debug mode
const DEBUG_MODE = AppConfig.DEV;

// Number each API request (used for debugging)
let requestCounter = 0;


/* Helper Functions ==================================================================== */
/**
  * Debug or not to debug
  */
github mattermost / mattermost-mobile / app / telemetry / telemetry_utils.js View on Github external
build_number: DeviceInfo.getBuildNumber(),
        bundle_id: DeviceInfo.getBundleId(),
        brand: DeviceInfo.getBrand(),
        country: DeviceInfo.getDeviceCountry(),
        device_id: DeviceInfo.getDeviceId(),
        device_locale: DeviceInfo.getDeviceLocale().split('-')[0],
        device_type: DeviceInfo.getDeviceType(),
        device_unique_id: DeviceInfo.getUniqueID(),
        height: height ? Math.floor(height) : 0,
        is_emulator: DeviceInfo.isEmulator(),
        is_tablet: DeviceInfo.isTablet(),
        manufacturer: DeviceInfo.getManufacturer(),
        max_memory: DeviceInfo.getMaxMemory(),
        model: DeviceInfo.getModel(),
        system_name: DeviceInfo.getSystemName(),
        system_version: DeviceInfo.getSystemVersion(),
        timezone: DeviceInfo.getTimezone(),
        app_version: DeviceInfo.getVersion(),
        width: width ? Math.floor(width) : 0,
    };
}
github mozilla-magnet / magnet-client / lib / utils / metrics.js View on Github external
function MagnetMetrics(storage) {
  this.storage = storage || AsyncStorage;
  this.metrics = new exports.Metrics(DeviceInfo.getUniqueID(),
    {
      locale: DeviceInfo.getDeviceLocale(),
      os: DeviceInfo.getSystemName(),
      os_version: DeviceInfo.getSystemVersion(),
      device: DeviceInfo.getDeviceName(),
      app_name: 'org.mozilla.magnet',
      app_version: DeviceInfo.getReadableVersion(),
      app_build_id: DeviceInfo.getBuildNumber(),
      app_platform: manufacturer
    }
  );
}
github easemob / webim-react-native / App / Containers / DeviceInfoScreen.js View on Github external
const HARDWARE_DATA = [
  {title: 'Device Manufacturer', info: DeviceInfo.getManufacturer()},
  {title: 'Device Name', info: DeviceInfo.getDeviceName()},
  {title: 'Device Model', info: DeviceInfo.getModel()},
  {title: 'Device Unique ID', info: DeviceInfo.getUniqueID()},
  {title: 'Device Locale', info: DeviceInfo.getDeviceLocale()},
  {title: 'Device Country', info: DeviceInfo.getDeviceCountry()},
  {title: 'User Agent', info: DeviceInfo.getUserAgent()},
  {title: 'Screen Width', info: Metrics.screenWidth},
  {title: 'Screen Height', info: Metrics.screenHeight}
]

const OS_DATA = [
  {title: 'Device System Name', info: DeviceInfo.getSystemName()},
  {title: 'Device ID', info: DeviceInfo.getDeviceId()},
  {title: 'Device Version', info: DeviceInfo.getSystemVersion()}
]

const APP_DATA = [
  {title: 'Bundle Id', info: DeviceInfo.getBundleId()},
  {title: 'Build Number', info: DeviceInfo.getBuildNumber()},
  {title: 'App Version', info: DeviceInfo.getVersion()},
  {title: 'App Version (Readable)', info: DeviceInfo.getReadableVersion()}
]

export default class DeviceInfoScreen extends React.Component {
  state: {
    isConnected: boolean,
    connectionInfo: Object | null,
    connectionInfoHistory: Array
  }
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(),
})