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

nativescript-dna-deviceinfo

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-dna-deviceinfo

NativeScript plugin to acquire device information.

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
741
increased by25.38%
Maintainers
1
Weekly downloads
 
Created
Source

NativeScript DNA Device Info

nativescript-dna-deviceinfo

NativeScript plugin to acquire device info.

Features

  • Cross-platform APIs for Android and iOS.
  • Offers APIs to obtain device related info.

Installation

From the command prompt, go to your app's root folder and execute:

tns plugin add nativescript-dna-deviceinfo

This command automatically installs the necessary files, as well as stores nativescript-dna-deviceinfo as a dependency in your project's package.json file.

Import / require

Various device related utility APIs are accessible from the DeviceInfo class. To import the class, use one of the following forms:

TypeScript:

import { DeviceInfo } from 'nativescript-dna-deviceinfo';

JavaScript:

const nativescript_dna_deviceinfo = require("nativescript-dna-deviceinfo");
const DeviceInfo = nativescript_dna_deviceinfo.DeviceInfo;

APIs

- totalMemory

Retrieves total memory(RAM) size in bytes.

- freeMemory

Retrieves available free memory(RAM) size in bytes.

- totalStorageSpace

Retrieves total storage(internal) space in bytes.

- freeStorageSpace

Retrieves free storage(internal) space in bytes.

- deviceId

Retrieves device ID.

- deviceName

Retrieves the device name.

- deviceLocale

Retrieves the device configured locale.

- deviceCountry

Retrieves the device country.

- timezone

Retrieves the device time zone.

- userAgent

Retrieves the device user agent.

- appName

Retrieves the app name.

- appVersion

Retrieves the app version.

- bundleId

Retrieves the app bundle id.

- bundleNumber

Retrieves the app bundle number.

- systemManufacturer

Retrieves the device manufacturer.

- isTablet

Returns 'true' if the device is tablet, otherwise 'false'.

- is24Hour

Returns 'true' if the device configured to 24-hour clock, otherwise 'false'.

- isEmulator

Returns 'true' if the app is running on emulator, otherwise 'false'.

License

MIT license (see LICENSE file)

Keywords

FAQs

Package last updated on 01 Jun 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