Skip to content

Latest commit

 

History

History
42 lines (28 loc) · 830 Bytes

File metadata and controls

42 lines (28 loc) · 830 Bytes

react-native-shell-tools

Library For Android Device Shell Tools

Installation

npm install react-native-shell-tools

Usage

import { execCommand, execAsyncCommand } from 'react-native-shell-tools';

// 
  // 异步用法
  execAsyncCommand(`cat /sys/class/qcom-battery/soh`)
    .then((res) => {
      console.log('execAsyncCommand', res);
    })
    .catch((err) => {
      console.log(err, 'execAsyncCommandErr');
    });
    // 同步用法
    const batteryRes = execCommand(`cat /sys/class/qcom-battery/soh`)
    console.log(batteryRes)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library