An open API service indexing awesome lists of open source software.

https://github.com/KwabenBerko/SmsBroadcastReceiver

:bangbang: **DEPRECATED** An Android Broadcast Receiver Library For Capturing/Reading Incoming SMS.
https://github.com/KwabenBerko/SmsBroadcastReceiver

android archived broadcast-reciever broadcastreceiver deprecated obsolete receiver sms sms-receiver

Last synced: 5 months ago
JSON representation

:bangbang: **DEPRECATED** An Android Broadcast Receiver Library For Capturing/Reading Incoming SMS.

Awesome Lists containing this project

README

          

[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)

## DEPRECATED
:bangbang: **This is no longer supported as Google now restricts access to SMS and Call Log Permissions**

An Android Broadcast Receiver Library For Capturing/Reading Incoming SMS.

### Download:

Download via Gradle:

```java
implementation 'com.github.KwabenBerko:smsbroadcastreceiverlib:0.0.1'
```

Or Maven:
```xml

com.github.KwabenBerko
smsbroadcastreceiverlib
0.0.1
pom

```

### Usage:
Create a custom class that inherits the `SmsBroadcastReceiver` class and override the onSmsReceived( ) method:

```java

public class MySmsReceiver extends SmsBroadcastReceiver {

@Override
protected void onSmsReceived(SmsMessage smsMessage) {
Log.d(MainActivity.TAG, "ONSMSRECEIVED");
Log.d(MainActivity.TAG, smsMessage.getDisplayOriginatingAddress());
Log.d(MainActivity.TAG, smsMessage.getDisplayMessageBody());
}
}

```

Add the following permissions to your `AndroidManifest.xml` file:

```xml

```

Still in the `AndroidManifest.xml` file, register your newly created custom class as a receiver:

```xml



```
Send an sms to the device's phone number and see it in action.

Happy Coding!