Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-device-info

Package Overview
Dependencies
Maintainers
5
Versions
256
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-device-info

Get device information using react-native

  • 0.26.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
593K
increased by2.37%
Maintainers
5
Weekly downloads
 
Created

What is react-native-device-info?

The react-native-device-info package provides device information and system details for React Native applications. It allows developers to access a wide range of device-specific information, such as device ID, system version, and more.

What are react-native-device-info's main functionalities?

Get Device ID

This feature allows you to retrieve the unique device ID of the device running the application.

import DeviceInfo from 'react-native-device-info';

const deviceId = DeviceInfo.getDeviceId();
console.log(deviceId);

Get System Version

This feature allows you to get the operating system version of the device.

import DeviceInfo from 'react-native-device-info';

const systemVersion = DeviceInfo.getSystemVersion();
console.log(systemVersion);

Get Application Version

This feature allows you to retrieve the version of the application currently running on the device.

import DeviceInfo from 'react-native-device-info';

const appVersion = DeviceInfo.getVersion();
console.log(appVersion);

Get Battery Level

This feature allows you to get the current battery level of the device.

import DeviceInfo from 'react-native-device-info';

DeviceInfo.getBatteryLevel().then(batteryLevel => {
  console.log(batteryLevel);
});

Get Device Name

This feature allows you to retrieve the name of the device.

import DeviceInfo from 'react-native-device-info';

DeviceInfo.getDeviceName().then(deviceName => {
  console.log(deviceName);
});

Other packages similar to react-native-device-info

Keywords

FAQs

Package last updated on 06 Feb 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc