# react-native-sms-receiver

> A React Native SMS Receiver

Latest version **1.0.0** (published 2022-10-16) · ISC license · 0 weekly downloads

## Install

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

## 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.0.0 |
| Published | 2022-10-16 |
| First published | 2020-06-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 21.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 12 |
| Author | robertbonfada |
| Maintainers | robertbonfada |
| Keywords | android, react-native-sms-receiver, read-sms, react-native |

## Links

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

## Dependencies (1)

- [react](https://npm.io/package/react.md) 16.11.0

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-10-16
- 0.0.17 — 2020-08-05
- 0.0.16 — 2020-08-03
- 0.0.15 — 2020-06-18
- 0.0.14 — 2020-06-18
- 0.0.13 — 2020-06-18
- 0.0.12 — 2020-06-18
- 0.0.11 — 2020-06-18
- 0.0.10 — 2020-06-18
- 0.0.9 — 2020-06-18
- 0.0.8 — 2020-06-18
- 0.0.7 — 2020-06-18
- 0.0.6 — 2020-06-18
- 0.0.5 — 2020-06-18
- 0.0.4 — 2020-06-18
- … 3 more at https://npm.io/package/react-native-sms-receiver/versions

## README

# react-native-sms-receiver
A package that creates a broadcast receiver of SMS

<a href="https://www.buymeacoffee.com/robertbonfada" target="_blank"><img src="https://i.ibb.co/djs76WD/buymeacoffee.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

## Installation 🚀 
```bash
#yarn
yarn add react-native-sms-receiver

#npm
npm install react-native-sms-receiver
```

Then, import with:

```js
import { requestReadSMSPermission, startReadSMS} from 'react-native-sms-receiver/Receiver';
```

## Usage

Example:

```js
import React, { useEffect } from "react";
import { Text, View } from "react-native";
import { requestReadSMSPermission, startReadSMS} from 'react-native-sms-receiver/Receiver';

export default function App() {
  const startReadingMessages = async () => {
    const hasPermission = await requestReadSMSPermission();
    if(hasPermission) {
      startReadSMS((status: any, sms: any, error: any) => {
        if (status == "success") {
          console.log("Great 🤠 !! you have received new sms:", sms);
        }
      });
    }
  }

  useEffect(() => {
    startReadingMessages();
  }, [])

  return (
    <View>
      <Text>🛸</Text>
    </View>
  );
}
```

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