# react-native-direct-sms

> This module allows send sms without user interaction

Latest version **1.2.9** (published 2022-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-direct-sms
pnpm add react-native-direct-sms
yarn add react-native-direct-sms
bun add react-native-direct-sms
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.9 |
| Published | 2022-11-05 |
| First published | 2022-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 20 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Your Name |
| Maintainers | tachgurbanov |
| Keywords | react-native |

## Links

- npm: https://www.npmjs.com/package/react-native-direct-sms
- Repository: https://github.com/tachgurbanov/react-native-direct-sms
- Homepage: https://github.com/tachgurbanov/react-native-direct-sms#readme
- Issues: https://github.com/tachgurbanov/react-native-direct-sms/issues
- npm.io page: https://npm.io/package/react-native-direct-sms

## Recent versions

- 1.2.9 (latest) — 2022-11-05
- 1.2.8 — 2022-08-31

## README

# react-native-direct-sms

## Getting started

`$ npm install react-native-direct-sms --save`

### Mostly automatic installation

`$ react-native link react-native-direct-sms`

## Usage
```javascript
import DirectSms from 'react-native-direct-sms';

DirectSms.sendDirectSms('999...', 'This is a direct sms');
 
```

## User Permission

```javascript
function sendDirectSms() {
    try {
        const granted = await PermissionsAndroid.request(
        PermissionsAndroid.PERMISSIONS.SEND_SMS,
            {
                title: 'App Sms Permission',
                message:
                'App needs access to your inbox         ' +
                'so you can send messages in background.',
                buttonNeutral: 'Ask Me Later',
                buttonNegative: 'Cancel',
                buttonPositive: 'OK',
            },
        );
        if (granted === PermissionsAndroid.RESULTS.GRANTED) {
            DirectSms.sendDirectSms('999...', 'This is a direct sms');
        } else {
            console.log('SMS permission denied');
        }
    } catch (err) {
        console.warn(err);
    }
}

```

---
_Source: https://npm.io/package/react-native-direct-sms · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
