https://github.com/rebeccahughes/react-native-device-info
Tip revision: 40cf51de8f1d87a5be8be2c36df400f1ceb953af authored by Mike Hardy on 03 July 2019, 17:18:50 UTC
2.2.0
2.2.0
Tip revision: 40cf51d
deviceinfo.js.flow
// @flow
export type DeviceType = 'Handset' | 'Tablet' | 'Tv' | 'Unknown';
declare module.exports: {
getUniqueID: () => string,
getManufacturer: () => string,
getBrand: () => string,
getModel: () => string,
getDeviceId: () => string,
getSystemName: () => string,
getSystemVersion: () => string,
getBuildId: () => string,
getBundleId: () => string,
getApplicationName: () => string,
getBuildNumber: () => string,
getVersion: () => string,
getReadableVersion: () => string,
getDeviceName: () => string,
getUserAgent: () => string,
getDeviceLocale: () => string,
getPreferredLocales: () => Array<string>,
getDeviceCountry: () => string,
getTimezone: () => string,
getInstanceID: () => string,
getInstallReferrer: () => string,
isEmulator: () => boolean,
isTablet: () => boolean,
getFontScale: () => number,
getBootloader: () => string,
getDevice: () => string,
getDisplay: () => string,
getFingerprint: () => string,
getHardware: () => string,
getHost: () => string,
getProduct: () => string,
getTags: () => string,
getType: () => string,
getBaseOS: () => string,
getPreviewSdkInt: () => number,
getSecurityPatch: () => string,
getCodename: () => string,
getIncremental: () => string,
is24Hour: () => boolean,
isPinOrFingerprintSet: () => (
cb: (isPinOrFingerprintSet: boolean) => void
) => void,
hasNotch: () => boolean,
getFirstInstallTime: () => number,
getLastUpdateTime: () => number,
getSerialNumber: () => string,
getAPILevel: () => number,
getIPAddress: () => Promise<string>,
getCameraPresence: () => Promise<boolean>,
getMACAddress: () => Promise<string>,
getPhoneNumber: () => ?string,
getCarrier: () => string,
getTotalMemory: () => number,
getMaxMemory: () => number,
getTotalDiskCapacity: () => number,
getFreeDiskStorage: () => number,
getBatteryLevel: () => Promise<number>,
getPowerState: () => Promise<Object>,
isBatteryCharging:() => Promise<boolean>,
isLandscape: () => boolean,
isAirPlaneMode: () => Promise<boolean>,
getDeviceType: () => DeviceType,
isAutoDateAndTime: () => Promise<boolean>,
isAutoTimeZone: () => Promise<boolean>,
supportedABIs: () => string[],
supported32BitAbis: () => string[],
supported64BitAbis: () => string[],
hasSystemFeature: (feature: string) => Promise<boolean>,
getSystemAvailableFeatures: () => Promise<Array<string>>,
isLocationEnabled: () => Promise<boolean>,
getAvailableLocationProviders: () => Promise<Object>,
};