Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ReScript bindings for react-native-device-info

License

NotificationsYou must be signed in to change notification settings

rescript-react-native/device-info

Build StatusVersionReScript Forum

ReScript bindings forreact-native-device-info.

Exposed asReactNativeDeviceInfo module.

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

Installation

Whenreact-native-device-infois properly installed & configured by following their installation instructions,you can install the bindings:

npm install @rescript-react-native/device-info#oryarn add @rescript-react-native/device-info

@rescript-react-native/device-info should be added tobs-dependencies in yourbsconfig.json:

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

Usage

Types

ReactNativeDeviceInfo.asyncHookResult('result)

{  ."loading":bool,"result":'result,}

ReactNativeDeviceInfo.powerState

typepowerState= {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 thechangelog for more informations about recentreleases.


Contribute

Read thecontribution guidelinesbefore contributing.

Code of Conduct

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

About

ReScript bindings for react-native-device-info

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp