Skip to content

Latest commit

 

History

History
91 lines (60 loc) · 3.32 KB

README.md

File metadata and controls

91 lines (60 loc) · 3.32 KB

React Native Silent Ping SMS

Table of contents

Synopsis

The react native silent ping sms will send a silent sms to another device and this will retrun the delivery report, tell us if this device is connected. This library only works on Android devices.

Description

  • Does not require rooted device
  • SMS will not be delivered as standard SMS, target user will receive no visual notification about SMS being received
  • Payload looks like this: byte[]{0x0A, 0x06, 0x03, (byte) 0xB0, (byte) 0xAF, (byte) 0x82, 0x03, 0x06, 0x6A, 0x00, 0x05} -It will show the delivery report at the java console log.

Links

Installation

$ npm install react-native-silent-ping-sms --save

Mostly automatic installation

$ react-native link react-native-silent-ping-sms

Manual installation

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.reactlibrary.RNSilentPingSmsPackage; to the imports at the top of the file
  • Add new RNSilentPingSmsPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-silent-ping-sms'
    project(':react-native-silent-ping-sms').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-silent-ping-sms/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      implementation project(':react-native-silent-ping-sms')
    
  3. Insert the following lines inside the AndroidManifest.xml in android/app/src/main/AndroidManifest.xml:
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.READ_SMS" />
    

Usage

import SilentPingSms from 'react-native-silent-ping-sms';

// you can put any number as Id to identify which message being process
    SendSilentSms.send(123, "Numberphone", (msg)=>{alert(msg)});

Professional Services

We provide special training, bug fixes with editor subscription, contributions for new features, and more.

Obtain a personalized service experience, associated with benefits and opportunities. Partner's Network

Contribute

Want to file a bug, contribute some code, or improve documentation? Excellent! Please send your code in a issue and we will check it.Issues Dashboard.

Copying

  • Name: Flyve MDM is a registered trademark of Teclib'.
  • Code: you can redistribute it and/or modify it under the terms of the GNU General Public License (GPLv3).
  • Documentation: released under Attribution 4.0 International (CC BY 4.0).