Socket
Socket
Sign inDemoInstall

@reason-react-native/device-info

Package Overview
Dependencies
0
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @reason-react-native/device-info

ReScript/Reason bindings for react-native-device-info


Version published
Maintainers
5
Install size
22.6 kB
Created

Readme

Source

@reason-react-native/device-info

Build Status Version Chat

ReScript / Reason bindings for react-native-device-info.

Exposed as ReactNativeDeviceInfo module.

@reason-react-native/device-info X.y.* means it's compatible with react-native-device-info X.y.*

Installation

When react-native-device-info is properly installed & configured by following their installation instructions, you can install the bindings:

npm install @reason-react-native/device-info
# or
yarn add @reason-react-native/device-info

@reason-react-native/device-info should be added to bs-dependencies in your bsconfig.json:

{
  //...
  "bs-dependencies": [
    "reason-react",
    "reason-react-native",
    // ...
+    "@reason-react-native/device-info"
  ],
  //...
}

Usage

Types

ReactNativeDeviceInfo.asyncHookResult('result)
{
  .
  "loading": bool,
  "result": 'result,
}
ReactNativeDeviceInfo.powerState
type powerState  = {
  batteryLevel: float,
  batteryState: string, // | "unplugged" | "charging" | "full" | "unknown"
  lowPowerMode: option(bool),
}

Methods

ReactNativeDeviceInfo.getAndroidId()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getApiLevel()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getApplicationName()
unit => string
ReactNativeDeviceInfo.getAvailableLocationProviders()
unit => Js.Promise.t(Js.Dict.t(bool))
ReactNativeDeviceInfo.getBaseOs()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getBatteryLevel()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getBootloader()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getBrand()
unit => string
ReactNativeDeviceInfo.getBuildId()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getBuildNumber()
unit => string
ReactNativeDeviceInfo.getBundleId()
unit => string
ReactNativeDeviceInfo.getCarrier()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getCodename()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getDevice()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getDeviceId()
unit => string
ReactNativeDeviceInfo.getDeviceName()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getDeviceType()
unit => string
ReactNativeDeviceInfo.getDisplay()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getFingerprint()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getFirstInstallTime()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getFontScale()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getFreeDiskStorage()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getHardware()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getHost()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getIncremental()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getInstallReferrer()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getInstanceId()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getIpAddress()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getLastUpdateTime()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getMacAddress()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getManufacturer()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getMaxMemory()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getModel()
unit => string
ReactNativeDeviceInfo.getPhoneNumber()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getPowerState()
unit => Js.Promise.t(powerState)
ReactNativeDeviceInfo.getPreviewSdkInt()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getProduct()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getReadableVersion()
unit => string
ReactNativeDeviceInfo.getSecurityPatch()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getSerialNumber()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getSystemAvailableFeatures()
unit => Js.Promise.t(Js.Array.t(string))
ReactNativeDeviceInfo.getSystemName()
unit => string
ReactNativeDeviceInfo.getSystemVersion()
unit => string
ReactNativeDeviceInfo.getTags()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getTotalDiskCapacity()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getTotalMemory()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getType()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getUniqueId()
unit => string
ReactNativeDeviceInfo.getUsedMemory()
unit => Js.Promise.t(float)
ReactNativeDeviceInfo.getUserAgent()
unit => Js.Promise.t(string)
ReactNativeDeviceInfo.getVersion()
unit => string
ReactNativeDeviceInfo.hasNotch()
unit => bool
ReactNativeDeviceInfo.hasSystemFeature()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isAirplaneMode()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isBatteryCharging()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isCameraPresent()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isEmulator()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isHeadphonesConnected()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isLandscape()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isLocationEnabled()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isPinOrFingerprintSet()
unit => Js.Promise.t(bool)
ReactNativeDeviceInfo.isTablet()
unit => bool
ReactNativeDeviceInfo.supported32BitAbis()
unit => Js.Promise.t(Js.Array.t(string))
ReactNativeDeviceInfo.supported64BitAbis()
unit => Js.Promise.t(Js.Array.t(string))
ReactNativeDeviceInfo.supportedAbis()
unit => Js.Promise.t(Js.Array.t(string))
ReactNativeDeviceInfo.useBatteryLevel()
unit => option(float)
ReactNativeDeviceInfo.useBatteryLevelIsLow()
unit => option(float)
ReactNativeDeviceInfo.useDeviceName()
unit => asyncHookResult(string)
ReactNativeDeviceInfo.useFirstInstallTime()
unit => asyncHookResult(float)
ReactNativeDeviceInfo.useHasSystemFeature()
string => asyncHookResult(bool)
ReactNativeDeviceInfo.useIsEmulator()
unit => asyncHookResult(bool)
ReactNativeDeviceInfo.usePowerState()
unit => powerState

Changelog

Check the changelog for more informations about recent releases.


Contribute

Read the contribution guidelines before contributing.

Code of Conduct

We want this community to be friendly and respectful to each other. Please read our full code of conduct so that you can understand what actions will and will not be tolerated.

Keywords

FAQs

Last updated on 06 Nov 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc