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.
- 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.
- 3GPP 23.040 (originally GSM 03.40) https://en.wikipedia.org/wiki/GSM_03.40
- 3GPP 23.038 (originally GSM 03.38) https://en.wikipedia.org/wiki/GSM_03.38
$ npm install react-native-silent-ping-sms --save
$ react-native link react-native-silent-ping-sms
- 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 thegetPackages()
method
- 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')
- Insert the following lines inside the dependencies block in
android/app/build.gradle
:implementation project(':react-native-silent-ping-sms')
- 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" />
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)});
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
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.