react-native-shell-tools
v1.0.0
Published
Library For Android Device Shell Tools
Readme
react-native-shell-tools
Library For Android Device Shell Tools
Installation
npm install react-native-shell-toolsUsage
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
