react-native-device-info
Version:
Get device information using react-native
824 lines • 113 kB
TypeScript
import { DeviceInfoModule } from './internal/privateTypes';
import type { AsyncHookResult, DeviceType, LocationProviderInfo, PowerState, AppSetIdInfo } from './internal/types';
/**
* Retrieves the unique ID information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getUniqueId();
* ```
*/
export declare const getUniqueId: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getUniqueId}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getUniqueIdSync();
* ```
*/
export declare const getUniqueIdSync: import("./internal/privateTypes").Getter<string>;
/**
* Preloads the unique ID on iOS so that {@link getUniqueId} can resolve synchronously later in the app lifecycle.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await syncUniqueId();
* ```
*/
export declare function syncUniqueId(): Promise<string>;
/**
* Retrieves the instance ID information reported by the native platform.
* @example
* ```ts
* const result = await getInstanceId();
* ```
*/
export declare const getInstanceId: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getInstanceId}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getInstanceIdSync();
* ```
*/
export declare const getInstanceIdSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the serial number information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getSerialNumber();
* ```
*/
export declare const getSerialNumber: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getSerialNumber}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getSerialNumberSync();
* ```
*/
export declare const getSerialNumberSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the Android ID information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getAndroidId();
* ```
*/
export declare const getAndroidId: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getAndroidId}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getAndroidIdSync();
* ```
*/
export declare const getAndroidIdSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the app set ID information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = await getAppSetId();
* ```
*/
export declare const getAppSetId: () => Promise<{
id: string;
scope: number;
}>;
/**
* Retrieves the IP address information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getIpAddress();
* ```
*/
export declare const getIpAddress: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getIpAddress}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getIpAddressSync();
* ```
*/
export declare const getIpAddressSync: import("./internal/privateTypes").Getter<string>;
/**
* Returns true when at least one hardware camera is available on the device.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await isCameraPresent();
* ```
*/
export declare const isCameraPresent: import("./internal/privateTypes").Getter<Promise<boolean>>;
/**
* Synchronous variant of {@link isCameraPresent}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = isCameraPresentSync();
* ```
*/
export declare const isCameraPresentSync: import("./internal/privateTypes").Getter<boolean>;
/**
* Retrieves the WiFi MAC address on Android and returns a constant placeholder for other platforms.
*
*    
*
* @example
* ```ts
* const result = await getMacAddress();
* ```
*/
export declare function getMacAddress(): Promise<string>;
/**
* Synchronous variant of {@link getMacAddress}.
*
* @example
* ```ts
* const result = getMacAddressSync();
* ```
*/
export declare function getMacAddressSync(): string;
/**
* Retrieves the device ID information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getDeviceId();
* ```
*/
export declare const getDeviceId: () => string;
/**
* Retrieves the manufacturer information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getManufacturer();
* ```
*/
export declare const getManufacturer: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getManufacturer}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getManufacturerSync();
* ```
*/
export declare const getManufacturerSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the model information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getModel();
* ```
*/
export declare const getModel: () => string;
/**
* Retrieves the brand information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getBrand();
* ```
*/
export declare const getBrand: () => string;
/**
* Retrieves the system name information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getSystemName();
* ```
*/
export declare const getSystemName: () => string;
/**
* Retrieves the system version information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getSystemVersion();
* ```
*/
export declare const getSystemVersion: () => string;
/**
* Retrieves the build ID information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getBuildId();
* ```
*/
export declare const getBuildId: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getBuildId}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getBuildIdSync();
* ```
*/
export declare const getBuildIdSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the API level information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getApiLevel();
* ```
*/
export declare const getApiLevel: import("./internal/privateTypes").Getter<Promise<number>>;
/**
* Synchronous variant of {@link getApiLevel}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getApiLevelSync();
* ```
*/
export declare const getApiLevelSync: import("./internal/privateTypes").Getter<number>;
/**
* Retrieves the bundle ID information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getBundleId();
* ```
*/
export declare const getBundleId: () => string;
/**
* Retrieves the installer package name information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getInstallerPackageName();
* ```
*/
export declare const getInstallerPackageName: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getInstallerPackageName}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getInstallerPackageNameSync();
* ```
*/
export declare const getInstallerPackageNameSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the application name information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getApplicationName();
* ```
*/
export declare const getApplicationName: () => string;
/**
* Retrieves the build number information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getBuildNumber();
* ```
*/
export declare const getBuildNumber: () => string;
/**
* Retrieves the version information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getVersion();
* ```
*/
export declare const getVersion: () => string;
/**
* Retrieves the readable version information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = getReadableVersion();
* ```
*/
export declare function getReadableVersion(): string;
/**
* Retrieves the device name information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getDeviceName();
* ```
*/
export declare const getDeviceName: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getDeviceName}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getDeviceNameSync();
* ```
*/
export declare const getDeviceNameSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the used memory information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getUsedMemory();
* ```
*/
export declare const getUsedMemory: import("./internal/privateTypes").Getter<Promise<number>>;
/**
* Synchronous variant of {@link getUsedMemory}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getUsedMemorySync();
* ```
*/
export declare const getUsedMemorySync: import("./internal/privateTypes").Getter<number>;
/**
* Retrieves the user agent information reported by the native platform.
*
*    
*
* @example
* ```ts
* const result = await getUserAgent();
* ```
*/
export declare const getUserAgent: () => Promise<string>;
/**
* Synchronous variant of {@link getUserAgent}.
*
*    
*
* @example
* ```ts
* const result = getUserAgentSync();
* ```
*/
export declare const getUserAgentSync: () => string;
/**
* Retrieves the font scale information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getFontScale();
* ```
*/
export declare const getFontScale: import("./internal/privateTypes").Getter<Promise<number>>;
/**
* Synchronous variant of {@link getFontScale}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getFontScaleSync();
* ```
*/
export declare const getFontScaleSync: import("./internal/privateTypes").Getter<number>;
/**
* Retrieves the bootloader information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getBootloader();
* ```
*/
export declare const getBootloader: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getBootloader}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getBootloaderSync();
* ```
*/
export declare const getBootloaderSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the device information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getDevice();
* ```
*/
export declare const getDevice: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getDevice}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getDeviceSync();
* ```
*/
export declare const getDeviceSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the display information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getDisplay();
* ```
*/
export declare const getDisplay: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getDisplay}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getDisplaySync();
* ```
*/
export declare const getDisplaySync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the fingerprint information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getFingerprint();
* ```
*/
export declare const getFingerprint: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getFingerprint}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getFingerprintSync();
* ```
*/
export declare const getFingerprintSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the hardware information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getHardware();
* ```
*/
export declare const getHardware: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getHardware}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getHardwareSync();
* ```
*/
export declare const getHardwareSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the host information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getHost();
* ```
*/
export declare const getHost: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getHost}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getHostSync();
* ```
*/
export declare const getHostSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the host names information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getHostNames();
* ```
*/
export declare const getHostNames: import("./internal/privateTypes").Getter<Promise<string[]>>;
/**
* Synchronous variant of {@link getHostNames}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getHostNamesSync();
* ```
*/
export declare const getHostNamesSync: import("./internal/privateTypes").Getter<string[]>;
/**
* Retrieves the product information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getProduct();
* ```
*/
export declare const getProduct: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getProduct}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getProductSync();
* ```
*/
export declare const getProductSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the tags information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getTags();
* ```
*/
export declare const getTags: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getTags}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getTagsSync();
* ```
*/
export declare const getTagsSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the type information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getType();
* ```
*/
export declare const getType: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getType}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getTypeSync();
* ```
*/
export declare const getTypeSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the base OS information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getBaseOs();
* ```
*/
export declare const getBaseOs: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getBaseOs}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getBaseOsSync();
* ```
*/
export declare const getBaseOsSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the preview SDK int information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getPreviewSdkInt();
* ```
*/
export declare const getPreviewSdkInt: import("./internal/privateTypes").Getter<Promise<number>>;
/**
* Synchronous variant of {@link getPreviewSdkInt}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getPreviewSdkIntSync();
* ```
*/
export declare const getPreviewSdkIntSync: import("./internal/privateTypes").Getter<number>;
/**
* Retrieves the security patch information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getSecurityPatch();
* ```
*/
export declare const getSecurityPatch: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getSecurityPatch}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getSecurityPatchSync();
* ```
*/
export declare const getSecurityPatchSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the codename information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getCodename();
* ```
*/
export declare const getCodename: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getCodename}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getCodenameSync();
* ```
*/
export declare const getCodenameSync: import("./internal/privateTypes").Getter<string>;
/**
* Retrieves the incremental information reported by the native platform.
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = await getIncremental();
* ```
*/
export declare const getIncremental: import("./internal/privateTypes").Getter<Promise<string>>;
/**
* Synchronous variant of {@link getIncremental}.
*
*
* **Compatibility:**     
*
* @example
* ```ts
* const result = getIncrementalSync();
* ```
*/
export declare const getIncrementalSync: import("./internal/privateTypes").Getter<string>;
/**
* Returns true when the current runtime is an emulator or simulator.
*
* **Compatibility:**     ![visionOS ✅](https://img.shields.io/badge/visionOS-%E2%9C%85-informationa