React Native Android Sms Listener screenshot

React Native Android Sms Listener

Author Avatar Theme by Andreyvital
Updated: 9 Sep 2020
372 Stars

Allows you to listen for incoming SMS messages using React Native

Categories

Overview

The react-native-android-sms-listener is a utility designed for React Native applications that enables developers to listen for incoming SMS messages on Android devices. This tool provides a convenient way to handle SMS interactions within React Native applications.

Features

  • Incoming SMS Listening: Receive and process incoming SMS messages within React Native apps.
  • CancellableSubscription: Ability to stop listening for incoming SMS messages by removing the subscription.
  • Permission Handling: Guidance on managing permissions needed for listening to SMS messages on Android devices.
  • Verification Support: Allow automatic verification of SMS codes received during signup processes, similar to popular messaging apps like Telegram or WhatsApp.
  • Third-Party Service Verification: Verify messages originating from fixed phone numbers when using third-party messaging services like Twilio.

Installation

To manually install the react-native-android-sms-listener utility, follow these steps:

  1. Update the android/settings.gradle file.

    include ':react-native-android-sms-listener'
    project(':react-native-android-sms-listener').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-android-sms-listener/android')
    
  2. Update the android/app/build.gradle file to add the dependency.

    dependencies {
        ...
        implementation project(':react-native-android-sms-listener')
    }
    
  3. Integrate the utility in the MainApplication.java file.

Summary

The react-native-android-sms-listener utility simplifies handling incoming SMS messages within React Native applications on Android devices. With features like permission handling, verification support, and third-party service verification, developers can efficiently manage SMS interactions in their apps. The installation process is straightforward, making it easy to incorporate this utility into React Native projects for enhanced SMS functionality.