How to use the expo-constants.installationId function in expo-constants

To help you get started, we’ve selected a few expo-constants 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 flow-typed / flow-typed / definitions / npm / expo-constants_v4.x.x / flow_v0.69.0-v0.103.x / test_expo-constants.js View on Github external
// $ExpectError
      (Constants.deviceName: 'ups...');
      // $ExpectError
      (Constants.deviceYearClass: 'ups...');
      // $ExpectError
      (Constants.experienceUrl: 'ups...');
      // $ExpectError
      (Constants.expoRuntimeVersion: 'ups...');
      // $ExpectError
      (Constants.expoVersion: 'ups...');
      // $ExpectError
      (Constants.isDetached: 'ups...');
      // $ExpectError
      (Constants.intentUri: 'ups...');
      // $ExpectError
      (Constants.installationId: 'ups...');
      // $ExpectError
      (Constants.isDevice: 'ups...');
      // $ExpectError
      (Constants.isHeadless: 'ups...');
      // $ExpectError
      (Constants.linkingUri: 'ups...');
      // $ExpectError
      (Constants.sessionId: 'ups...');
      // $ExpectError
      (Constants.statusBarHeight: 'ups...');
      // $ExpectError
      (Constants.systemVersion: 'ups...');
      // $ExpectError
      (Constants.systemFonts: 'ups...');
    });
  });
github wheatandcat / Peperomia / PeperomiaNative / src / app.tsx View on Github external
checkUser = (data: User | null, error: ResultError) => {
    if (error) {
      return;
    }

    if (!data) {
      const uuid = Constants.installationId + uuidv1();
      const user: User = {
        uuid
      };
      db.transaction((tx: SQLite.Transaction) => {
        insertUser(tx, user, this.setUser);
      });

      AsyncStorage.setItem("userID", user.uuid);
      // 現在のバージョンを設定
      AsyncStorage.setItem("APP_VERSION", app.expo.version);
    } else {
      AsyncStorage.setItem("userID", data.uuid);
      this.setState({
        loading: false
      });
    }
github expo / expo / packages / expo / src / logs / RemoteLogging.ts View on Github external
async function _sendNextLogBatchAsync(batch: LogEntry[], logUrl: string): Promise {
  let response;

  let headers = {
    'Content-Type': 'application/json',
    Connection: 'keep-alive',
    'Proxy-Connection': 'keep-alive',
    Accept: 'application/json',
    'Device-Id': Constants.installationId,
    'Session-Id': _sessionId,
  };
  if (Constants.deviceName) {
    headers['Device-Name'] = Constants.deviceName;
  }
  try {
    response = await fetch(logUrl, {
      method: 'POST',
      headers,
      body: JSON.stringify(batch),
    });
  } catch (error) {
    _transportEventEmitter.emit('error', { error });
    return;
  }
github Marwan01 / food-converter / node_modules / expo / build / logs / RemoteLogging.js View on Github external
async function _sendNextLogBatchAsync(batch, logUrl) {
    let response;
    let headers = {
        'Content-Type': 'application/json',
        Connection: 'keep-alive',
        'Proxy-Connection': 'keep-alive',
        Accept: 'application/json',
        'Device-Id': Constants.installationId,
        'Session-Id': _sessionId,
    };
    if (Constants.deviceName) {
        headers['Device-Name'] = Constants.deviceName;
    }
    try {
        response = await fetch(logUrl, {
            method: 'POST',
            headers,
            body: JSON.stringify(batch),
        });
    }
    catch (error) {
        _transportEventEmitter.emit('error', { error });
        return;
    }
github expo / expo / home / utils / getSnackId.js View on Github external
export default function getSnackId() {
  if (!_snackId) {
    let hash = sha1(Constants.installationId).toLowerCase();
    _snackId = `${hash.slice(0, 4)}-${hash.slice(4, 8)}`;
  }
  return _snackId;
}