https://github.com/rebeccahughes/react-native-device-info
Tip revision: 7da02bc8a0a6cb60684daee96799582bb68002e8 authored by Johan-dutoit on 13 September 2019, 19:54:48 UTC
v3.1.0
v3.1.0
Tip revision: 7da02bc
deviceinfo.js.flow
// @flow
export type DeviceType = 'Handset' | 'Tablet' | 'Tv' | 'Unknown';
declare module.exports: {
getUniqueId: () => Promise<string>,
getUniqueIdSync: () => string,
getManufacturer: () => Promise<string>,
getManufacturerSync: () => string,
getBrand: () => Promise<string>,
getBrandSync: () => string,
getModel: () => Promise<string>,
getModelSync: () => string,
getDeviceId: () => Promise<string>,
getDeviceIdSync: () => string,
getSystemName: () => Promise<string>,
getSystemNameSync: () => string,
getSystemVersion: () => Promise<string>,
getSystemVersionSync: () => string,
getBuildId: () => Promise<string>,
getBuildIdSync: () => string,
getBundleId: () => Promise<string>,
getBundleIdSync: () => string,
getApplicationName: () => Promise<string>,
getApplicationNameSync: () => string,
getBuildNumber: () => Promise<string>,
getBuildNumberSync: () => string,
getVersion: () => Promise<string>,
getVersionSync: () => string,
getReadableVersion: () => Promise<string>,
getReadableVersionSync: () => string,
getDeviceName: () => Promise<string>,
getDeviceNameSync: () => string,
getUsedMemory: () => Promise<number>,
getUsedMemorySync: () => number,
getUserAgent: () => Promise<string>,
getUserAgentSync: () => string,
getInstanceId: () => Promise<string>,
getInstanceIdSync: () => string,
getInstallReferrer: () => Promise<string>,
getInstallReferrerSync: () => string,
isEmulator: () => Promise<boolean>,
isEmulatorSync: () => boolean,
isTablet: () => Promise<boolean>,
isTabletSync: () => boolean,
getFontScale: () => Promise<number>,
getFontScaleSync: () => number,
getBootloader: () => Promise<string>,
getBootloaderSync: () => string,
getDevice: () => Promise<string>,
getDeviceSync: () => string,
getDisplay: () => Promise<string>,
getDisplaySync: () => string,
getFingerprint: () => Promise<string>,
getFingerprintSync: () => string,
getHardware: () => Promise<string>,
getHardwareSync: () => string,
getHost: () => Promise<string>,
getHostSync: () => string,
getProduct: () => Promise<string>,
getProductSync: () => string,
getTags: () => Promise<string>,
getTagsSync: () => string,
getType: () => Promise<string>,
getTypeSync: () => string,
getBaseOs: () => Promise<string>,
getBaseOsSync: () => string,
getPreviewSdkInt: () => Promise<number>,
getPreviewSdkIntSync: () => number,
getSecurityPatch: () => Promise<string>,
getSecurityPatchSync: () => string,
getCodename: () => Promise<string>,
getCodenameSync: () => string,
getIncremental: () => Promise<string>,
getIncrementalSync: () => string,
isPinOrFingerprintSet: () => Promise<boolean>,
isPinOrFingerprintSetSync: () => boolean,
hasNotch: () => Promise<boolean>,
hasNotchSync: () => boolean,
getFirstInstallTime: () => Promise<number>,
getFirstInstallTimeSync: () => number,
getLastUpdateTime: () => Promise<number>,
getLastUpdateTimeSync: () => number,
getSerialNumber: () => Promise<string>,
getSerialNumberSync: () => string,
getAndroidId: () => Promise<string>,
getAndroidIdSync: () => string,
getApiLevel: () => Promise<number>,
getApiLevelSync: () => number,
getIpAddress: () => Promise<string>,
getIpAddressSync: () => string,
getCameraPresence: () => Promise<boolean>,
getCameraPresenceSync: () => boolean,
getMacAddress: () => Promise<string>,
getMacAddressSync: () => string,
getPhoneNumber: () => Promise<?string>,
getPhoneNumberSync: () => ?string,
getCarrier: () => Promise<string>,
getCarrierSync: () => string,
getTotalMemory: () => Promise<number>,
getTotalMemorySync: () => number,
getMaxMemory: () => Promise<number>,
getMaxMemorySync: () => number,
getTotalDiskCapacity: () => Promise<number>,
getTotalDiskCapacitySync: () => number,
getFreeDiskStorage: () => Promise<number>,
getFreeDiskStorageSync: () => number,
getBatteryLevel: () => Promise<number>,
getBatteryLevelSync: () => number,
getPowerState: () => Promise<Object>,
getPowerStateSync: () => Object,
isBatteryCharging:() => Promise<boolean>,
isBatteryChargingSync: () => boolean,
isLandscape: () => Promise<boolean>,
isLandscapeSync: () => boolean,
isAirplaneMode: () => Promise<boolean>,
isAirplaneModeSync: () => boolean,
getDeviceType: () => Promise<DeviceType>,
getDeviceTypeSync: () => DeviceType,
supportedAbis: () => Promise<Array<string>>,
supportedAbisSync: () => Array<string>,
supported32BitAbis: () => Promise<Array<string>>,
supported32BitAbisSync: () => Array<string>,
supported64BitAbis: () => Promise<Array<string>>,
supported64BitAbisSync: () => Array<string>,
hasSystemFeature: (feature: string) => Promise<boolean>,
hasSystemFeatureSync: (feature: string) => boolean,
getSystemAvailableFeatures: () => Promise<Array<string>>,
getSystemAvailableFeaturesSync: () => Array<string>,
isLocationEnabled: () => Promise<boolean>,
isLocationEnabledSync: () => boolean,
getAvailableLocationProviders: () => Promise<Object>,
getAvailableLocationProvidersSync: () => Object,
};