This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

react-native-android-shell

1.3.1 • Public • Published

react-native-android-shell

This module for execute shell android, use command and execute shell

Screenshot

Alt text Alt text Alt text

Getting started

$ npm install react-native-android-shell --save

Usage

import AndroidShell from 'react-native-android-shell';
 
// TODO: What to do with the module?
AndroidShell.executeCommand('your Command', (result) => {
  console.log(result)
});

Example

import React, { Component } from 'react';
import { View, Text } from 'react-native';
import AndroidShell from 'react-native-android-shell'
 
class demo extends Component {
    constructor(props) {
        super(props);
        this.state = {
            result: ''
        };
    }
 
    componentDidMount() {
        AndroidShell.executeCommand("ls", (result) => {
            this.setState({ result: 'yeu : ' + result });
            console.log('Result :', result);
        });
    }
 
    render() {
        return (
            <View style={{alignItems: 'center', flex: 1 }}>
                <Text>{this.state.result}</Text>
            </View>
        );
    }
}
 
export default demo;

Package Sidebar

Install

npm i react-native-android-shell

Weekly Downloads

22

Version

1.3.1

License

MIT

Unpacked Size

386 kB

Total Files

38

Last publish

Collaborators

  • jul.dev