SMS Radar - Parent

Android library created to listen incoming and outgoing SMS's

License

License

GroupId

GroupId

com.tuenti.smsradar
ArtifactId

ArtifactId

smsradar-parent
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

pom
Description

Description

SMS Radar - Parent
Android library created to listen incoming and outgoing SMS's
Project URL

Project URL

http://github.com/tuenti/SmsRadar/
Project Organization

Project Organization

Tuenti Technologies S.L.
Source Code Management

Source Code Management

https://github.com/tuenti/SmsRadar/

Download smsradar-parent

How to add to project

<!-- https://jarcasting.com/artifacts/com.tuenti.smsradar/smsradar-parent/ -->
<dependency>
    <groupId>com.tuenti.smsradar</groupId>
    <artifactId>smsradar-parent</artifactId>
    <version>1.0.4</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/com.tuenti.smsradar/smsradar-parent/
implementation 'com.tuenti.smsradar:smsradar-parent:1.0.4'
// https://jarcasting.com/artifacts/com.tuenti.smsradar/smsradar-parent/
implementation ("com.tuenti.smsradar:smsradar-parent:1.0.4")
'com.tuenti.smsradar:smsradar-parent:pom:1.0.4'
<dependency org="com.tuenti.smsradar" name="smsradar-parent" rev="1.0.4">
  <artifact name="smsradar-parent" type="pom" />
</dependency>
@Grapes(
@Grab(group='com.tuenti.smsradar', module='smsradar-parent', version='1.0.4')
)
libraryDependencies += "com.tuenti.smsradar" % "smsradar-parent" % "1.0.4"
[com.tuenti.smsradar/smsradar-parent "1.0.4"]

Dependencies

provided (1)

Group / Artifact Type Version
com.google.android : android jar 4.1.1.4

Project Modules

  • library
  • sample

SMS Radar Build Status Maven Central Android Arsenal

Read incoming and outgoing text messages using an Android application across different Android SDK versions it's not trivial. If yo don't want to appear as SMS application and your application has to read incoming and outgoing SMSs this is your library.

This Android library offers you two main classes to use to start listening text messages. SMS Radar is implemented in top of an Android service. To start / stop listening text messages use SmsRadar.initializeSmsRadarService(context, listener) with a Context instance and a SmsListener implementation.

Each time the device owner receives one SMS the SmsListener used to initialize SmsRadarService service will be notified in on onSmsSent(Sms sms) or onSmsReceived(Sms sms) methods.

The SMS information provided on SmsListener methods is:

  • SMS address. MSISDN used to send/receive the SMS.
  • SMS date. SMS local creation date.
  • SMS content. Message sent in the SMS.
  • SMS type. One SMS can be received or sent. Review SmsType enum if need it.

This library works on Android 2.X or higher versions.

Download

Download the project, compile it using mvn clean install import smsradar-1.0.4.jar into your project.

Or declare it into your pom.xml

<dependency>
    <groupId>com.tuenti.smsradar</groupId>
    <artifactId>library</artifactId>
    <version>1.0.4</version>
</dependency>

Or into your build.gradle

dependencies{
    compile 'com.tuenti.smsradar:library:1.0.4'
}

Usage

Declare permissions to read SMS content provider in your AndroidManifest:

<uses-permission android:name="android.permission.READ_SMS"/>

Declare SmsRadar service in your AndroidManifest:

<service
		android:name=".SmsRadarService"
		android:exported="false"
		android:label="@string/app_name"/>

To use SMS Radar library you only have to initialize SmsRadar using a Context instance and one SmsListener:

SmsRadar.initializeSmsRadarService(context, new SmsListener() {
			@Override
			public void onSmsSent(Sms sms) {
				showSmsToast(sms);
			}

			@Override
			public void onSmsReceived(Sms sms) {
				showSmsToast(sms);
			}
		});

You can stop the SMS observer like in this sample:

SmsRadar.stopSmsRadarService(context);

Credits & Contact

SmsRadar was created by Android team at Tuenti Technologies S.L.. You can follow Tuenti engineering team on Twitter @tuentieng.

License

SmsRadar is available under the Apache License, Version 2.0. See LICENSE.txt file for more info.

com.tuenti.smsradar

Tuenti Code

Versions

Version
1.0.4