react-native-abi-detector
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

react-native-abi-detector

An ABI detector for react-native android app.

Getting Started

$ yarn add react-native-abi-detector

or

$ npm install --save react-native-abi-detector

Using React Native >= 0.60

Linking the package manually is not required anymore with Autolinking.

Using React Native < 0.60

$ react-native link react-native-abi-detector

Usage

import React, { useState, useEffect } from 'react';
import { ABIDetector, ABIs } from 'react-native-abi-detector';
 
const App = () => { 
  const [abi, setAbi] = useState(ABIs.UNKNOWN)
 
  useEffect(() => {
    ABIDetector.get().then(abi => {
      setAbi(abi)
    })
  }, [])
 
  return (
    <View style={{ flex: 1, backgroundColor: '#212121' }}>
      <Text>
        {abi}
      </Text>
    </View>
  )
}

Props

interface ABIDetector {
  get: () => Promise<string>
}
 
interface ABIs {
  ARMV8: string
  ARMV7: string
  ARMV5: string
  X86_64: string
  X86: string
  UNKNOWN: string
}

Thanks

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-abi-detector

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

10.5 kB

Total Files

12

Last publish

Collaborators

  • kuss