Library to read incoming SMS in Android for Expo (React Native)

Last update: Jul 31, 2022

react-native-expo-read-sms

Maintainers

maniac-tech Active maintainer

Installation

Install this in your managed Expo project by running this command:

$ npm install @maniac-tech/react-native-expo-read-sms --save

Usage

  1. Import the startReadSMS function after installation

    import { startReadSMS } from "@maniac-tech/react-native-expo-read-sms";

  2. Pass Success and Error callbacks startReadSMS(successCallbackFn, errorCallbackFn)

  3. Everytime an SMS has been received successCallbackFn will be called with the sms

Methods

Method name Description Params Returns
checkIfHasSMSPermission Function which checks if the application has READ_SMS and RECEIVE_SMS permissions - { hasReceiveSmsPermission: true/false, hasReadSmsPermission: true/false }
requestReadSMSPermission Requests READ_SMS and RECEIVE_SMS permission, if missing - Returns true if granted, and false otherwise
startReadSMS Starts listening for incoming messages. Note: SMS Permissions should be present. callback fn Incoming message body

Important Note:

Ensure your app has READ_SMS, and RECEIVE_SMS, failing which you'll receive error on calling the function

Support

Tested on Expo SDK v44 & v45, and Node JS v14

License

MIT

GitHub

https://github.com/maniac-tech/react-native-expo-read-sms
You might also like...

NativeScript empowers you to access native platform APIs from JavaScript directly. Angular, Capacitor, Ionic, React, Svelte, Vue and you name it compatible.

NativeScript empowers you to access native platform APIs from JavaScript directly. Angular, Capacitor, Ionic, React, Svelte, Vue and you name it compatible.

NativeScript empowers you to access native APIs from JavaScript directly. The framework currently provides iOS and Android runtimes for rich mobile de

Aug 12, 2022

Wrapper for Kustomer SDK v2.0 for react native

Wrapper for Kustomer SDK v2.0 for react native

This is a wrapper for Kustomer v2 Sdk for react native. This implements the kust

Dec 30, 2021

React Native Stone SDK Implementation (Support for both Mobile and POS versions)

react-native-stone-pos Stone Android POS Native Module Installation Stone has a private packageCloud repository, so we need to have your token before

Aug 5, 2022

Android SMS receiver with firestore and Jetpack compose

Android SMS receiver with firestore and Jetpack compose

Android SMS Receiver Android SMS receiver with firestore and Jetpack compose App

Dec 26, 2021

SMSfirsAJ - Sample of how to intercept a SMS with BroadcastReceiver

SMS Received Sample of how to intercept a SMS with BroadcastReceiver Simples ste

Jan 7, 2022

A Python native extension written in Kotlin Native

Kotlin Python Ext This is a proof of concept for a Python extension in Kotlin. It is recommended to read the Official Python C API Documentation befor

Jun 22, 2022

Native-loader - Safely load native libraries in Java

Native Loader 📦️ Safe native loading in Java based off of the native-loader use

Jan 5, 2022

An android app to read gitbook in the offline mode.

An android app to read gitbook in the offline mode.

gitbook-android An android app to read gitbook in the offline mode. Requirement Android 2.3+ Preview License Copyright (C) 2016 Snowdream Mobile yang

Feb 16, 2022

A beautiful android Quotes App where you can read and save quotes.

A beautiful android Quotes App where you can read and save quotes.

This repository contains source code of a Quotes app, which helps you stay motivated by providing best picked quotes stated by famous personalities. This app uses zen quotes api, for retrieving quotes.

Aug 2, 2022
Comments
  • 1. Can see warnings around NativeEventEmitter in console

    Description:

    Can see the following errors when the startReadSMS function is called:

    
    WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method.
    WARN  `new NativeEventEmitter()` was called with a non-null argument without the required `removeListeners` method.
    
    Reviewed by maniac-tech at 2022-07-16 07:12
  • 2. Add SMS related permissions to AndroidManifest

    Description:

    At the moment, we need to manually set READ_SMS and RECEIVE_SMS permissions in the app after installing the package.

    This update handles this in two ways:

    • Added these permissions to the AndroidManifest.xml
    • Updated requestReadSMSPermission to ask the user for granting the permission via Android Native API
    Reviewed by maniac-tech at 2022-07-30 12:04
  • 3. Add SMS related permissions to AndroidManifest

    Description:

    At the moment, we need to manually set READ_SMS and RECEIVE_SMS permissions in the app after installing the package, can we instead get them added to the library itself ?

    Reviewed by maniac-tech at 2022-07-30 10:49
  • 4. Expose `hasPermissions` function

    Description:

    We have hasPermissions which checks if we have the required SMS permissions in place.

    Currently it is being used internally, but we wan it to be available outside the lib too.

    Reviewed by maniac-tech at 2022-07-24 09:43
React-native-user-interface - Change React Native userinterface at runtime

react-native-user-interface change RN userinterface at runtime. Installation npm

Jan 11, 2022
Self hosted read and to-read list book tracker
Self hosted read and to-read list book tracker

JELU Official documentation Like Jelu or find it useful ? Offer me a coffee ☕ Purpose This app main purpose is to track what you have read, what you a

Aug 8, 2022
Simple library to decompress files .zip, .rar, .cbz, .cbr in React Native.
Simple library to decompress files .zip, .rar, .cbz, .cbr in React Native.

Uncompress React Native Simple library to decompress files .zip, .rar, .cbz and .cbr in React Native. Installation yarn add uncompress-react-native o

Jul 11, 2022
Initiate immediate phone call for React Native on iOS and Android.

react-native-immediate-call-library Initiate immediate phone call for React Native on iOS and Android. Getting started Using npm: npm install react-na

Jul 19, 2021
A 2020s compatible React Native keyboard avoiding view for Android and iOS that just works.

react-native-keyboard-shift Example Snack coming soon Until then: Clone this repo: git clone https://github.com/FullStackCraft/react-native-keyboard-s

May 12, 2022
A demo for Android font typeface support in React Native!
A demo for Android font typeface support in React Native!

A Step-by-step Guide to a Consistent Multi-Platform Font Typeface Experience in React Native Goal Be able to use font typeface modifiers such as fontW

Aug 2, 2022
🚀 React Native Segmented Control, Pure Javascript for iOS and Android
🚀 React Native Segmented Control, Pure Javascript for iOS and Android

Installation Add the dependency: npm i react-native-segmented-control-2 Peer Dependencies Zero Dependency ?? Usage Import import SegmentedControl from

Jun 28, 2022
A react native interface for integrating payments using PayPal

react-native-paypal Getting started Installation npm install react-native-paypal Android Specific Add this to your build.gradle maven { url "https:

Dec 14, 2021
Make SIP calls from react-native using Linphone SDK

react-native-sip Make SIP calls from react-native using Linphone SDK Installation npm install react-native-sip Usage import { multiply } from "react-n

Jun 30, 2022
A framework for building native applications using React

React Native Learn once, write anywhere: Build mobile apps with React. Getting Started · Learn the Basics · Showcase · Contribute · Community · Suppor

Aug 17, 2022