53.0.3 • Published 5 months ago

@rn-common/device-info v53.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

@rn-common/device-info

Overview

This module provides utility functions to retrieve information about the device and the application. It leverages the expo-device and expo-application libraries to access various details such as device name, model, operating system, app version, and more.

Installation

Install using:

npx expo install @rn-common/device-info expo-application expo-device

Functions

1. getDeviceInfo

Retrieves detailed information about the device.

Returns:

  • DeviceInfo: An object containing device-related information.

Structure of DeviceInfo object:

  • deviceName (string): The name of the device.
  • modelName (string): The model name of the device.
  • os (string): The operating system of the device.
  • osVersion (string): The version of the operating system.

Example:

import { getDeviceInfo } from '@rn-common/device-info'

const deviceInfo = getDeviceInfo()
console.log(deviceInfo)

2. getAppInfo

Retrieves detailed information about the application.

Returns:

  • AppInfo: An object containing application-related information.

Structure of AppInfo object:

  • name (string): The name of the application.
  • version (string): The native version of the application.
  • buildNumber (string): The native build version of the application.
  • appId (string): The application ID.

Example:

import { getAppInfo } from '@rn-common/device-info'

const appInfo = getAppInfo()
console.log(appInfo)
0.1.0

1 year ago

0.0.1

1 year ago

0.1.1

1 year ago

53.0.1

5 months ago

52.0.0

10 months ago

52.0.1

10 months ago

52.0.3

9 months ago

53.0.2

5 months ago

53.0.3

5 months ago

1.0.0

1 year ago