react-native-device-info

  • Version 10.13.2
  • Published
  • 684 kB
  • No dependencies
  • MIT license

Install

npm i react-native-device-info
yarn add react-native-device-info
pnpm add react-native-device-info

Overview

Get device information using react-native

Index

Variables

Functions

Interfaces

Type Aliases

Variables

variable DeviceInfo

const DeviceInfo: DeviceInfoModule;

    variable getAndroidId

    const getAndroidId: Getter<Promise<string>>;

      variable getAndroidIdSync

      const getAndroidIdSync: Getter<string>;

        variable getApiLevel

        const getApiLevel: Getter<Promise<number>>;

          variable getApiLevelSync

          const getApiLevelSync: Getter<number>;

            variable getAvailableLocationProviders

            const getAvailableLocationProviders: Getter<Promise<LocationProviderInfo>>;

              variable getAvailableLocationProvidersSync

              const getAvailableLocationProvidersSync: Getter<LocationProviderInfo>;

                variable getBaseOs

                const getBaseOs: Getter<Promise<string>>;

                  variable getBaseOsSync

                  const getBaseOsSync: Getter<string>;

                    variable getBatteryLevel

                    const getBatteryLevel: Getter<Promise<number>>;

                      variable getBatteryLevelSync

                      const getBatteryLevelSync: Getter<number>;

                        variable getBootloader

                        const getBootloader: Getter<Promise<string>>;

                          variable getBootloaderSync

                          const getBootloaderSync: Getter<string>;

                            variable getBrightness

                            const getBrightness: Getter<Promise<number>>;

                              variable getBrightnessSync

                              const getBrightnessSync: Getter<number>;

                                variable getBuildId

                                const getBuildId: Getter<Promise<string>>;

                                  variable getBuildIdSync

                                  const getBuildIdSync: Getter<string>;

                                    variable getCarrier

                                    const getCarrier: Getter<Promise<string>>;

                                      variable getCarrierSync

                                      const getCarrierSync: Getter<string>;

                                        variable getCodename

                                        const getCodename: Getter<Promise<string>>;

                                          variable getCodenameSync

                                          const getCodenameSync: Getter<string>;

                                            variable getDevice

                                            const getDevice: Getter<Promise<string>>;

                                              variable getDeviceName

                                              const getDeviceName: Getter<Promise<string>>;

                                                variable getDeviceNameSync

                                                const getDeviceNameSync: Getter<string>;

                                                  variable getDeviceSync

                                                  const getDeviceSync: Getter<string>;

                                                    variable getDisplay

                                                    const getDisplay: Getter<Promise<string>>;

                                                      variable getDisplaySync

                                                      const getDisplaySync: Getter<string>;

                                                        variable getFingerprint

                                                        const getFingerprint: Getter<Promise<string>>;

                                                          variable getFingerprintSync

                                                          const getFingerprintSync: Getter<string>;

                                                            variable getFirstInstallTime

                                                            const getFirstInstallTime: Getter<Promise<number>>;

                                                              variable getFirstInstallTimeSync

                                                              const getFirstInstallTimeSync: Getter<number>;

                                                                variable getFontScale

                                                                const getFontScale: Getter<Promise<number>>;

                                                                  variable getFontScaleSync

                                                                  const getFontScaleSync: Getter<number>;

                                                                    variable getFreeDiskStorage

                                                                    const getFreeDiskStorage: Getter<Promise<number>>;

                                                                      variable getFreeDiskStorageSync

                                                                      const getFreeDiskStorageSync: Getter<number>;

                                                                        variable getHardware

                                                                        const getHardware: Getter<Promise<string>>;

                                                                          variable getHardwareSync

                                                                          const getHardwareSync: Getter<string>;

                                                                            variable getHost

                                                                            const getHost: Getter<Promise<string>>;

                                                                              variable getHostNames

                                                                              const getHostNames: Getter<Promise<string[]>>;

                                                                                variable getHostNamesSync

                                                                                const getHostNamesSync: Getter<string[]>;

                                                                                  variable getHostSync

                                                                                  const getHostSync: Getter<string>;

                                                                                    variable getIncremental

                                                                                    const getIncremental: Getter<Promise<string>>;

                                                                                      variable getIncrementalSync

                                                                                      const getIncrementalSync: Getter<string>;

                                                                                        variable getInstallerPackageName

                                                                                        const getInstallerPackageName: Getter<Promise<string>>;

                                                                                          variable getInstallerPackageNameSync

                                                                                          const getInstallerPackageNameSync: Getter<string>;

                                                                                            variable getInstallReferrer

                                                                                            const getInstallReferrer: Getter<Promise<string>>;

                                                                                              variable getInstallReferrerSync

                                                                                              const getInstallReferrerSync: Getter<string>;

                                                                                                variable getInstanceId

                                                                                                const getInstanceId: Getter<Promise<string>>;

                                                                                                  variable getInstanceIdSync

                                                                                                  const getInstanceIdSync: Getter<string>;

                                                                                                    variable getIpAddress

                                                                                                    const getIpAddress: Getter<Promise<string>>;

                                                                                                      variable getIpAddressSync

                                                                                                      const getIpAddressSync: Getter<string>;

                                                                                                        variable getLastUpdateTime

                                                                                                        const getLastUpdateTime: Getter<Promise<number>>;

                                                                                                          variable getLastUpdateTimeSync

                                                                                                          const getLastUpdateTimeSync: Getter<number>;

                                                                                                            variable getManufacturer

                                                                                                            const getManufacturer: Getter<Promise<string>>;

                                                                                                              variable getManufacturerSync

                                                                                                              const getManufacturerSync: Getter<string>;

                                                                                                                variable getMaxMemory

                                                                                                                const getMaxMemory: Getter<Promise<number>>;

                                                                                                                  variable getMaxMemorySync

                                                                                                                  const getMaxMemorySync: Getter<number>;

                                                                                                                    variable getPhoneNumber

                                                                                                                    const getPhoneNumber: Getter<Promise<string>>;

                                                                                                                      variable getPhoneNumberSync

                                                                                                                      const getPhoneNumberSync: Getter<string>;

                                                                                                                        variable getPowerState

                                                                                                                        const getPowerState: Getter<Promise<Partial<PowerState>>>;

                                                                                                                          variable getPowerStateSync

                                                                                                                          const getPowerStateSync: Getter<Partial<PowerState>>;

                                                                                                                            variable getPreviewSdkInt

                                                                                                                            const getPreviewSdkInt: Getter<Promise<number>>;

                                                                                                                              variable getPreviewSdkIntSync

                                                                                                                              const getPreviewSdkIntSync: Getter<number>;

                                                                                                                                variable getProduct

                                                                                                                                const getProduct: Getter<Promise<string>>;

                                                                                                                                  variable getProductSync

                                                                                                                                  const getProductSync: Getter<string>;

                                                                                                                                    variable getSecurityPatch

                                                                                                                                    const getSecurityPatch: Getter<Promise<string>>;

                                                                                                                                      variable getSecurityPatchSync

                                                                                                                                      const getSecurityPatchSync: Getter<string>;

                                                                                                                                        variable getSerialNumber

                                                                                                                                        const getSerialNumber: Getter<Promise<string>>;

                                                                                                                                          variable getSerialNumberSync

                                                                                                                                          const getSerialNumberSync: Getter<string>;

                                                                                                                                            variable getSupportedMediaTypeList

                                                                                                                                            const getSupportedMediaTypeList: Getter<Promise<string[]>>;

                                                                                                                                              variable getSupportedMediaTypeListSync

                                                                                                                                              const getSupportedMediaTypeListSync: Getter<string[]>;

                                                                                                                                                variable getSystemAvailableFeatures

                                                                                                                                                const getSystemAvailableFeatures: Getter<Promise<string[]>>;

                                                                                                                                                  variable getSystemAvailableFeaturesSync

                                                                                                                                                  const getSystemAvailableFeaturesSync: Getter<string[]>;

                                                                                                                                                    variable getTags

                                                                                                                                                    const getTags: Getter<Promise<string>>;

                                                                                                                                                      variable getTagsSync

                                                                                                                                                      const getTagsSync: Getter<string>;

                                                                                                                                                        variable getTotalDiskCapacity

                                                                                                                                                        const getTotalDiskCapacity: Getter<Promise<number>>;

                                                                                                                                                          variable getTotalDiskCapacitySync

                                                                                                                                                          const getTotalDiskCapacitySync: Getter<number>;

                                                                                                                                                            variable getTotalMemory

                                                                                                                                                            const getTotalMemory: Getter<Promise<number>>;

                                                                                                                                                              variable getTotalMemorySync

                                                                                                                                                              const getTotalMemorySync: Getter<number>;

                                                                                                                                                                variable getType

                                                                                                                                                                const getType: Getter<Promise<string>>;

                                                                                                                                                                  variable getTypeSync

                                                                                                                                                                  const getTypeSync: Getter<string>;

                                                                                                                                                                    variable getUniqueId

                                                                                                                                                                    const getUniqueId: Getter<Promise<string>>;

                                                                                                                                                                      variable getUniqueIdSync

                                                                                                                                                                      const getUniqueIdSync: Getter<string>;

                                                                                                                                                                        variable getUsedMemory

                                                                                                                                                                        const getUsedMemory: Getter<Promise<number>>;

                                                                                                                                                                          variable getUsedMemorySync

                                                                                                                                                                          const getUsedMemorySync: Getter<number>;

                                                                                                                                                                            variable hasGms

                                                                                                                                                                            const hasGms: Getter<Promise<boolean>>;

                                                                                                                                                                              variable hasGmsSync

                                                                                                                                                                              const hasGmsSync: Getter<boolean>;

                                                                                                                                                                                variable hasHms

                                                                                                                                                                                const hasHms: Getter<Promise<boolean>>;

                                                                                                                                                                                  variable hasHmsSync

                                                                                                                                                                                  const hasHmsSync: Getter<boolean>;

                                                                                                                                                                                    variable isAirplaneMode

                                                                                                                                                                                    const isAirplaneMode: Getter<Promise<boolean>>;

                                                                                                                                                                                      variable isAirplaneModeSync

                                                                                                                                                                                      const isAirplaneModeSync: Getter<boolean>;

                                                                                                                                                                                        variable isBatteryCharging

                                                                                                                                                                                        const isBatteryCharging: Getter<Promise<boolean>>;

                                                                                                                                                                                          variable isBatteryChargingSync

                                                                                                                                                                                          const isBatteryChargingSync: Getter<boolean>;

                                                                                                                                                                                            variable isCameraPresent

                                                                                                                                                                                            const isCameraPresent: Getter<Promise<boolean>>;

                                                                                                                                                                                              variable isCameraPresentSync

                                                                                                                                                                                              const isCameraPresentSync: Getter<boolean>;

                                                                                                                                                                                                variable isEmulator

                                                                                                                                                                                                const isEmulator: Getter<Promise<boolean>>;

                                                                                                                                                                                                  variable isEmulatorSync

                                                                                                                                                                                                  const isEmulatorSync: Getter<boolean>;

                                                                                                                                                                                                    variable isHeadphonesConnected

                                                                                                                                                                                                    const isHeadphonesConnected: Getter<Promise<boolean>>;

                                                                                                                                                                                                      variable isHeadphonesConnectedSync

                                                                                                                                                                                                      const isHeadphonesConnectedSync: Getter<boolean>;

                                                                                                                                                                                                        variable isKeyboardConnected

                                                                                                                                                                                                        const isKeyboardConnected: Getter<Promise<boolean>>;

                                                                                                                                                                                                          variable isKeyboardConnectedSync

                                                                                                                                                                                                          const isKeyboardConnectedSync: Getter<boolean>;

                                                                                                                                                                                                            variable isLocationEnabled

                                                                                                                                                                                                            const isLocationEnabled: Getter<Promise<boolean>>;

                                                                                                                                                                                                              variable isLocationEnabledSync

                                                                                                                                                                                                              const isLocationEnabledSync: Getter<boolean>;

                                                                                                                                                                                                                variable isMouseConnected

                                                                                                                                                                                                                const isMouseConnected: Getter<Promise<boolean>>;

                                                                                                                                                                                                                  variable isMouseConnectedSync

                                                                                                                                                                                                                  const isMouseConnectedSync: Getter<boolean>;

                                                                                                                                                                                                                    variable isPinOrFingerprintSet

                                                                                                                                                                                                                    const isPinOrFingerprintSet: Getter<Promise<boolean>>;

                                                                                                                                                                                                                      variable isPinOrFingerprintSetSync

                                                                                                                                                                                                                      const isPinOrFingerprintSetSync: Getter<boolean>;

                                                                                                                                                                                                                        variable supported32BitAbis

                                                                                                                                                                                                                        const supported32BitAbis: Getter<Promise<string[]>>;

                                                                                                                                                                                                                          variable supported32BitAbisSync

                                                                                                                                                                                                                          const supported32BitAbisSync: Getter<string[]>;

                                                                                                                                                                                                                            variable supported64BitAbis

                                                                                                                                                                                                                            const supported64BitAbis: Getter<Promise<string[]>>;

                                                                                                                                                                                                                              variable supported64BitAbisSync

                                                                                                                                                                                                                              const supported64BitAbisSync: Getter<string[]>;

                                                                                                                                                                                                                                variable supportedAbis

                                                                                                                                                                                                                                const supportedAbis: Getter<Promise<string[]>>;

                                                                                                                                                                                                                                  variable supportedAbisSync

                                                                                                                                                                                                                                  const supportedAbisSync: Getter<string[]>;

                                                                                                                                                                                                                                    Functions

                                                                                                                                                                                                                                    function getApplicationName

                                                                                                                                                                                                                                    getApplicationName: () => string;

                                                                                                                                                                                                                                      function getBrand

                                                                                                                                                                                                                                      getBrand: () => string;

                                                                                                                                                                                                                                        function getBuildNumber

                                                                                                                                                                                                                                        getBuildNumber: () => string;

                                                                                                                                                                                                                                          function getBundleId

                                                                                                                                                                                                                                          getBundleId: () => string;

                                                                                                                                                                                                                                            function getDeviceId

                                                                                                                                                                                                                                            getDeviceId: () => string;

                                                                                                                                                                                                                                              function getDeviceToken

                                                                                                                                                                                                                                              getDeviceToken: () => Promise<string>;

                                                                                                                                                                                                                                                function getDeviceType

                                                                                                                                                                                                                                                getDeviceType: () => string;

                                                                                                                                                                                                                                                  function getDeviceTypeSync

                                                                                                                                                                                                                                                  getDeviceTypeSync: () => string;

                                                                                                                                                                                                                                                    function getFreeDiskStorageOld

                                                                                                                                                                                                                                                    getFreeDiskStorageOld: () => Promise<number>;

                                                                                                                                                                                                                                                      function getFreeDiskStorageOldSync

                                                                                                                                                                                                                                                      getFreeDiskStorageOldSync: () => number;

                                                                                                                                                                                                                                                        function getMacAddress

                                                                                                                                                                                                                                                        getMacAddress: () => Promise<string>;

                                                                                                                                                                                                                                                          function getMacAddressSync

                                                                                                                                                                                                                                                          getMacAddressSync: () => string;

                                                                                                                                                                                                                                                            function getModel

                                                                                                                                                                                                                                                            getModel: () => string;

                                                                                                                                                                                                                                                              function getReadableVersion

                                                                                                                                                                                                                                                              getReadableVersion: () => string;

                                                                                                                                                                                                                                                                function getSystemName

                                                                                                                                                                                                                                                                getSystemName: () => string;

                                                                                                                                                                                                                                                                  function getSystemVersion

                                                                                                                                                                                                                                                                  getSystemVersion: () => string;

                                                                                                                                                                                                                                                                    function getTotalDiskCapacityOld

                                                                                                                                                                                                                                                                    getTotalDiskCapacityOld: () => Promise<number>;

                                                                                                                                                                                                                                                                      function getTotalDiskCapacityOldSync

                                                                                                                                                                                                                                                                      getTotalDiskCapacityOldSync: () => number;

                                                                                                                                                                                                                                                                        function getUserAgent

                                                                                                                                                                                                                                                                        getUserAgent: () => Promise<string>;

                                                                                                                                                                                                                                                                          function getUserAgentSync

                                                                                                                                                                                                                                                                          getUserAgentSync: () => string;

                                                                                                                                                                                                                                                                            function getVersion

                                                                                                                                                                                                                                                                            getVersion: () => string;

                                                                                                                                                                                                                                                                              function hasDynamicIsland

                                                                                                                                                                                                                                                                              hasDynamicIsland: () => boolean;

                                                                                                                                                                                                                                                                                function hasNotch

                                                                                                                                                                                                                                                                                hasNotch: () => boolean;

                                                                                                                                                                                                                                                                                  function hasSystemFeature

                                                                                                                                                                                                                                                                                  hasSystemFeature: (feature: string) => Promise<boolean>;

                                                                                                                                                                                                                                                                                    function hasSystemFeatureSync

                                                                                                                                                                                                                                                                                    hasSystemFeatureSync: (feature: string) => boolean;

                                                                                                                                                                                                                                                                                      function isDisplayZoomed

                                                                                                                                                                                                                                                                                      isDisplayZoomed: () => boolean;

                                                                                                                                                                                                                                                                                        function isLandscape

                                                                                                                                                                                                                                                                                        isLandscape: () => Promise<boolean>;

                                                                                                                                                                                                                                                                                          function isLandscapeSync

                                                                                                                                                                                                                                                                                          isLandscapeSync: () => boolean;

                                                                                                                                                                                                                                                                                            function isLowBatteryLevel

                                                                                                                                                                                                                                                                                            isLowBatteryLevel: (level: number) => boolean;

                                                                                                                                                                                                                                                                                              function isLowRamDevice

                                                                                                                                                                                                                                                                                              isLowRamDevice: () => boolean;

                                                                                                                                                                                                                                                                                                function isTablet

                                                                                                                                                                                                                                                                                                isTablet: () => boolean;

                                                                                                                                                                                                                                                                                                  function isTabletMode

                                                                                                                                                                                                                                                                                                  isTabletMode: () => Promise<boolean>;

                                                                                                                                                                                                                                                                                                    function syncUniqueId

                                                                                                                                                                                                                                                                                                    syncUniqueId: () => Promise<string>;

                                                                                                                                                                                                                                                                                                      function useBatteryLevel

                                                                                                                                                                                                                                                                                                      useBatteryLevel: () => number | null;

                                                                                                                                                                                                                                                                                                        function useBatteryLevelIsLow

                                                                                                                                                                                                                                                                                                        useBatteryLevelIsLow: () => number | null;

                                                                                                                                                                                                                                                                                                          function useBrightness

                                                                                                                                                                                                                                                                                                          useBrightness: () => number | null;

                                                                                                                                                                                                                                                                                                            function useDeviceName

                                                                                                                                                                                                                                                                                                            useDeviceName: () => AsyncHookResult<string>;

                                                                                                                                                                                                                                                                                                              function useFirstInstallTime

                                                                                                                                                                                                                                                                                                              useFirstInstallTime: () => AsyncHookResult<number>;

                                                                                                                                                                                                                                                                                                                function useHasSystemFeature

                                                                                                                                                                                                                                                                                                                useHasSystemFeature: (feature: string) => AsyncHookResult<boolean>;

                                                                                                                                                                                                                                                                                                                  function useIsEmulator

                                                                                                                                                                                                                                                                                                                  useIsEmulator: () => AsyncHookResult<boolean>;

                                                                                                                                                                                                                                                                                                                    function useIsHeadphonesConnected

                                                                                                                                                                                                                                                                                                                    useIsHeadphonesConnected: () => AsyncHookResult<boolean>;

                                                                                                                                                                                                                                                                                                                      function useManufacturer

                                                                                                                                                                                                                                                                                                                      useManufacturer: () => AsyncHookResult<string>;

                                                                                                                                                                                                                                                                                                                        function usePowerState

                                                                                                                                                                                                                                                                                                                        usePowerState: () => Partial<PowerState>;

                                                                                                                                                                                                                                                                                                                          Interfaces

                                                                                                                                                                                                                                                                                                                          interface AsyncHookResult

                                                                                                                                                                                                                                                                                                                          interface AsyncHookResult<T> {}

                                                                                                                                                                                                                                                                                                                            property loading

                                                                                                                                                                                                                                                                                                                            loading: boolean;

                                                                                                                                                                                                                                                                                                                              property result

                                                                                                                                                                                                                                                                                                                              result: T;

                                                                                                                                                                                                                                                                                                                                interface LocationProviderInfo

                                                                                                                                                                                                                                                                                                                                interface LocationProviderInfo {}

                                                                                                                                                                                                                                                                                                                                  index signature

                                                                                                                                                                                                                                                                                                                                  [key: string]: boolean;

                                                                                                                                                                                                                                                                                                                                    interface PowerState

                                                                                                                                                                                                                                                                                                                                    interface PowerState {}

                                                                                                                                                                                                                                                                                                                                      property batteryLevel

                                                                                                                                                                                                                                                                                                                                      batteryLevel: number;

                                                                                                                                                                                                                                                                                                                                        property batteryState

                                                                                                                                                                                                                                                                                                                                        batteryState: BatteryState;

                                                                                                                                                                                                                                                                                                                                          property lowPowerMode

                                                                                                                                                                                                                                                                                                                                          lowPowerMode: boolean;

                                                                                                                                                                                                                                                                                                                                            index signature

                                                                                                                                                                                                                                                                                                                                            [key: string]: any;

                                                                                                                                                                                                                                                                                                                                              Type Aliases

                                                                                                                                                                                                                                                                                                                                              type DeviceType

                                                                                                                                                                                                                                                                                                                                              type DeviceType =
                                                                                                                                                                                                                                                                                                                                              | 'Handset'
                                                                                                                                                                                                                                                                                                                                              | 'Tablet'
                                                                                                                                                                                                                                                                                                                                              | 'Tv'
                                                                                                                                                                                                                                                                                                                                              | 'Desktop'
                                                                                                                                                                                                                                                                                                                                              | 'GamingConsole'
                                                                                                                                                                                                                                                                                                                                              | 'unknown';

                                                                                                                                                                                                                                                                                                                                                Package Files (2)

                                                                                                                                                                                                                                                                                                                                                Dependencies (0)

                                                                                                                                                                                                                                                                                                                                                No dependencies.

                                                                                                                                                                                                                                                                                                                                                Dev Dependencies (25)

                                                                                                                                                                                                                                                                                                                                                Peer Dependencies (1)

                                                                                                                                                                                                                                                                                                                                                Badge

                                                                                                                                                                                                                                                                                                                                                To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                                                                                                                                                                                                                                                                                                You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-native-device-info.

                                                                                                                                                                                                                                                                                                                                                • Markdown
                                                                                                                                                                                                                                                                                                                                                  [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-native-device-info)
                                                                                                                                                                                                                                                                                                                                                • HTML
                                                                                                                                                                                                                                                                                                                                                  <a href="https://www.jsdocs.io/package/react-native-device-info"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>