0% found this document useful (0 votes)
68 views36 pages

Batch 20 Project Report

Uploaded by

Clash Clan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views36 pages

Batch 20 Project Report

Uploaded by

Clash Clan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 36

CLASSIFYING MESSAGE APPLICATION

USING KOTLIN

CS8611- MINI PROJECT

Submitted by

RAGHUL S (113020104303)
SIVAKUMAR P (113020104307)
ANAND KUMAR Y (113020104301)
SARAN SANJAY R (113020104306)

In partial fulfillment for the award of the

degree of

BACHELOR OF ENGINEERING

IN

COMPUTER SCIENCE AND ENGINEERING

VEL TECH HIGH TECH


Dr. RANGARAJAN Dr. SAKUNTHALA ENGINEERING COLLEGE
An Autonomous Institution

VEL TECH HIGH TECH DR.RANGARAJAN DR.


SAKUNTHALA ENGINEERING COLLEGE, AVADI

An Autonomous Institution
Approved by AICTE,New Delhi/ Affiliated to Anna University, Chennai –
600025 MAY 2023

1
VEL TECH HIGH TECH
Dr. RANGARAJAN Dr. SAKUNTHALA ENGINEERING COLLEGE
An Autonomous Institution

Approved by AICTE-New Delhi, Affiliated to Anna University, Chennai


Accredited by NBA, New Delhi & Accredited by NAAC with “A” Grade & CGPA of 3.27

BONAFIDE CERTIFICATE

Certified that this mini project entitled “CLASSIFYING MESSAGE


APPLICATION USING KOTLIN” is the bonafide work of “Raghul S,
Sivakumar P , Anandkumar Y, Saran Sanjay R” who carried out the work under
my supervision.

SIGNATURE SIGNATURE
Dr. DURGA DEVI, B.E., M.E., PhD., Mr.Parthiban M.A
HEAD OF THE DEPARTMENT ASSISTANT PROFESSOR
Computer Science and Engineering Computer Science and Engineering
Dept. of Computer Science and Engg.Vel Dept. of Computer Science and Engg.Vel
Tech High Tech Dr.Rangarajan Tech High Tech Dr.Rangarajan
Dr.Sakunthala Engineering College Avadi, Dr.Sakunthala Engineering College Avadi,
Chennai - 600062 Chennai - 600062

2
CERTIFICATE OF EVALUATION

COLLEGE NAME: VEL TECH HIGH TTECH DR


RANGARAJAN & DR SAKUNTHALA
ENGINEERING COLLEGE AVADI.

BRANCH: COMPUTER SCIENCE AND ENGINEERING

SEMESTER: VI

S.NO NAME OF THE TITLE OF THE NAME OF THE


STUDENT PROJECT SUPERVISOR

RAGHUL S
1. (113020104303)
SIVAKUMAR P
CLASSIFYING Mr.Parthiban M.A
2. (113020104307)
MESSAGE
ANAND KUMAR Y APPLICATION ASSISTANT
3. (113020104301) USING KOTLIN PROFESSOR
SARAN SANJAY R
4. (113020104306)

The report of the project work submitted by the above


students in partial fulfillment for the award of Bachelor of
Engineering degree in Computer Science and Engineering of
Anna University for the viva voce examination held at
VelTech High Tech Dr.Rangarajan Dr.Sakunthala
Engineering College on

has been evaluated and confirmed to be reports of the work


done by the above students.

3
INTERNAL EXAMINER EXTERNAL
EXAMINER

4
ACKNOWLEDGMENT

We wish to express our sincere thanks to the people who extended their help during
the course of our Mini Project work.

First of all we would like to express our deep gratitude to our beloved and respected
FOUNDER & CHAIRMAN Col. Prof. Vel. Shri. Dr. R. RANGARAJAN B.E. (Elec.),
B.E (Mech.), M.S (Auto.), DSC, and FOUNDRESS & VICE CHAIRMAN Dr.
SAKUNTHALA RANGARAJAN M.B.B.S. We also record sincere thanks to our
Honourable Principal, Dr. E.KAMALANABAN B.E., M.E., Ph.D., for his kind support for
his Mini Project.

We are thankful and extremely grateful to our Dean-SoEC Dr. V. RAVI and Head of the
department Dr. S. DURGADEVI, B.E., M.E., Ph.D., for their support and motivation feed
to us for doing the Mini Project.

We would like to extend our sincere thanks to our guide Mr.PARTHIBAN M.A, for her
technical support during this project. Her stupendous encouragement enabled us to complete
our Mini Project successfully.

We would like to extend our sincere thanks to our Project Coordinator Dr. M. MALATHY
B.E., M.E., Ph.D., for their continuous support over this Mini Project.
TABLE OF CONTENTS
CHAPTER TITLE PG NO
NO
ABSTRACT 6
1 INRODUCTION 7
2 LITERATURE REVIEW 10
2.1 INTRODUCTION
2.2 Short Message Service (SMS)
2.3 BULK SMS

2.4 TEXTLOCAL
2.5 LOGONUTILITY
3 KEY POINTS 11
3.1 ANDROID
3.2 ABOUT ANDROID APP
KOTLIN THE PROGRAMMING
3.3
LANGUAGE
3.4 GOOGLE FIREBASE
3.4.1 WHY FIREBASE OVER SQL

3.5 SECURE SOCKETS LAYER


3.6 REAL TIME DATABASE
3.7 XML
4 EXISTING AND PROPOSED SYSTEM 14
4.1 EXISTING SYSTEM
4.2. PROPOSED SYSTEM
5 MODULES 17
5.1 ANDROID APP STUDIO
5.2 SPAM FILTERING PROCESS

5.3 OTP DETECTION


5.4 TRANSCATION DETECTION
6 SYSTEM ARCHITECTURE 20
7 SOURCE CODE 21
8 IMPLEMENTATIONS 26

6
9 SAMPLE OUTPUT SCREENSHOTS 27
9.1 SAMPLE XML SCREEN
9.2 SMS INTERFACE
9.3 SMS OTP DETECTION
9.4 SMS TRANSACTION
9.5 SMS SPAM DETECTION
10 RESULT 30
11 CONCLUSION 31
12 REFERENCES 32

7
Abstract

The use of short message service (SMS) has grown tremendously in the past few
years. Billions of users use this service to send text messages. Various applications
have been introduced by service providers, e.g., mobile banking, summons
checkpoint, SMS chat, etc., all of which have become a huge success. This chapter
gives an overview of how this service is provided and discusses various SMS
applications offered to the user. We explore the reasons behind its success and the
issues that must be addressed to provide these applications. We also examine future
trends and the challenges that must be overcome in order to enhance this service. We
hope that this chapter gives a better understanding of how SMS applications are
provided and what may be expected in future applications given the enhancement on
the current SMS and technology advancementAlthough it is a widely used
communication mechanism for cell phone users, SMS is far more than just a
technology for teenage chat. SMS technology evolved out of the global system for
mobile communications standard, an internationally accepted cell phone network
specification the European Telecommunications Standards Institute created. The 3rd
Generation Partnership Project maintains the SMS standard. SMS messages are
handled via a short message service center that the cellular provider maintains for
the end devices. The SMSC can send SMS messages to the end device using a
maximum payload of 140 octets. This defines the upper bound of an SMS message
to be 160 characters using 7-bit encoding. It is possible to specify other schemes
such as 8-bit or 16-bit encoding, which decreases the maximum message length to
140 and 70 characters, respectively.

8
Chapter 1

1.1 Introduction

Short Message Service (SMS) is the most frequently and widely used
communication medium. The term “SMS” is used for both the user activity and all
types of short text messaging in many parts of the world. It has become a medium of
advertisement and promotion of products, banking updates, agricultural information,
flight updates and internet offers. SMS is also employed in direct marketing known
as SMS marketing. Sometimes SMS marketing is a matter of disturbance to users.
These kinds of SMSs are called spam SMS. Spam is one or more unsolicited
messages, which is unwanted to the users, sent or posted as part of a larger collection
of messages, all having substantially identical content. The purposes of SMS spam
are advertisement and marketing of various products, sending political issues,
spreading inappropriate adult content and internet offers. That is why spam SMS
flooding has become a serious problem all over the world. SMS spamming gained
popularity over other spamming approaches like email and twitter, due to the
increasing popularity of SMS communication. However, opening rates of SMS are
higher than 90% and opened within 15 minutes of receipt whereas opening rate in
email is only 20-25% within 24 hours of receipt . Thus, a proper SMS spam
detection technique has significant necessity. There are several researches on email,
twitter, web and social tagging spam detection techniques. However, a very few
researches have been conducted on SMS spam detection. Spam SMS detection is
more challenging than email spam detection because of the restricted length of SMS,
use of regional content and shortcut words and SMS contains less header
information than an email

9
Chapter 2
Literature survey

2.1 Introduction:
We are visit www.textlocal.in and www.logonutility.com for get the some
information about the bulk SMS. In this literature survey we are understand about
the bulk message sender and how to send bulk amount of message in any
organization for information alert about the organization. Textlocal is says that the
bulk message sender are most useful in big commercial agencies for sending the
bulk amount of messages. Logon Utility has a Bulk SMS gateway that pushes the
simple message to mobile phones. In other words, we have an effective tool that
sends the Bulk SMS through the internet to the people on the handheld device.

2.2 Short Message Service (SMS)?

SMS stand for short message service. It is technology that enables the sending
and receiving of message between mobile phones. SMS first appeared in European
1992. One SMS message can contain at most 140 bytes of data, so one SMS
message
can contain up to 160 characters .once a message is sent it is received by a SMSC
(short message service center) which must then get it to the appropriate mobile
device.

2.3 Bulk SMS ?

The Bulk SMS is very popular to send bulk amount of the message in the
organization & Used in Marketing and Banking. Bulk SMS is often used by Big &
10
small business owners, E-commerce industry, media Companies, Banks for Alerts,
Marketing and Fraud control alerts, Reminders, Marketing of products and services.
It’s also commonly used between staffs of company or bank and their clients. One
advantage of Bulk Messaging is that it delivers your message directly to the mobile
handsets anywhere around World.

2.4 Textlocal:

We are visit www.textlocal.in for get the some information about the bulk
SMS. In this literature survey we are understand about the bulk message sender and
how to send bulk amount of message in any organization for information alert about
the organization. www.textlocal.in is says that the bulk message sender are most
useful in big commercial agencies for sending the bulk amount of messages.
Bulk SMS or bulk messaging refers to businesses sending SMS to one or
more recipients via software platforms such as Textlocal. Bulk SMS can scale up to
millions of recipients in the case of informational or promotional broadcasts.
Alternatively, bulk SMS can also mean individual SMS sent to customers upon an
action e.g. receiving an alert on credit card transaction. Both these activities can be
easily carried out from bulk SMS platforms as they allow businesses to create,
schedule, send and track SMS campaigns.

2.5 Logonutility:

In this digital world, while exploring on the internet, we got the names of
many Bulk SMS service providers and picked up one randomly, hence
disappointments. To get the best Bulk SMS service provider is a somehow daunting
task. But today, this barrier will be overcome by the Logon Utility. It is an IT
company that has a robust SMS reseller network of 1200+ and handling over
15000+
11
clients in India. Utility’s success is entirely shown on an official website
logonutility.com where you can look at our best setup, services, infrastructure, and
veteran professionals as well.
The Logon utility have free Bulk SMS credits for first time signup clients so
visit our contact page and fill inquiry form to get more benefits. During sign up a
question come in mind that How to send Bulk SMS than we also have complete
information available on website. Send Bulk text messages online and also know
what
is SMS messaging.

12
Chapter 3
Key Words and Definitions
3.1 Android

Android is a mobile operating system based on a modified version of the Linux


kernel and other open-source software, designed primarily for touch screen mobile
devices. Android is developed by a consortium of developers known as the Open
Handset Alliance and commercially sponsored by Google.

3.2 About Android App

Android App is software designed to run on an Android device or emulator. The


term also refers to an APK file which stands for Android package. This file is a Zip
archive containing app code, resources, and meta information. Android apps can be
written in Kotlin, Java, and C++ and are run inside Virtual Machine.

3.3 Kotlin the Programming Language

Kotlin is a cross-platform, statically typed, general-purpose programming


language with type inference. Kotlin is designed to interoperate fully with Java, and
the JVM version of Kotlin's standard library depends on the Java Class Library but
type inference allows its syntax to be more concise. Kotlin mainly targets the JVM,
but also compiles to Java Script or native code via LLVM Language development
costs are borne by JetBrains, while the Kotlin Foundation protects the Kotlin
trademark.

Kotlin is used by over 60% of professional Android developers that helps boost
productivity, developer satisfaction, and code safety.

On 7 May 2019, Google announced that the Kotlin programming language is now its
preferred language for Android app developers. Since the release of Android

13
Studio 3.0 in October 2017, Kotlin has been included as an alternative to the
standard Java compiler.

3.4 Google firebase

Firebase is a set of hosting services for any type of application (Android, iOS, Java
script, Node.js, Java, Unity, PHP, C++ ...). It offers NoSQL and real-time hosting of
databases, content, social authentication (Google, Face book, Twitter and Github),
and notifications, or services, such as a real-time communication server.
Firebase is a Backend-as-a-Service (BaaS) app development platform that provides
hosted backend services such as a real time database, cloud storage, authentication,
crash reporting, machine learning, remote configuration, and hosting for your static
files. Firebase supports Android App Studio.

3.4.1Why Firebase over SQL


Firebase is the one kind of NoSQL databases The Firebase database is just a big
JSON object where you can store whatever you want inside. Unlike SQL there's no
schema for the database, no tables, no columns, it's just a combination of key/value
pairs. SQL's predefined schemas determine the structure of data before you use it,
which can be restrictive.
Another great advantage of the Firebase framework is its swift and secure hosting
services. Firebase Hosting has extended support for all content types such as web
applications, static and dynamic content. Furthermore, the Firebase Hosting provider
ensures high security of the content using zero-configuration SSL.

3.5 Secure Sockets Layer


SSL stands for secure sockets layer. Protocol for web browsers and servers that
allows for the authentication, encryption & decryption of data sent over the internet.

14
3.6 Real time Database
Fire Base is a Real time Data Base. Having a real-time database is the standout
feature of the Firebase framework. Firebase caters to a cloud-hosted database in
which the data is stored as JSON and further synchronized constantly to each
associated client. Having a real-time database instance that updates the current data
is essential for modern applications.

3.7 XML

XML stands for eXtensible Markup Language, which is a way of describing data
using a text-based document. Because XML is extensible and very flexible, it's used
for many different things, including defining the UI layout of Android apps.
Other resources like strings for your app are also defined in an XML file
called strings.xml. You describe the view hierarchy of UI elements on the screen.
For example, a Constraint Layout can contain Buttons, Text Views, Image Views, or
other views. Remember, Constraint Layout is a subclass of View Group. It allows
you to position or size child views in a flexible manner.
We can see there are three sections at top right corner
1. Code
2. Split
3. Design

Code option allows us to view the entire code the working slide. Split is useful when
we want to check both the code and design side by side. Design is used to view the
design of the screen generated and allows us to make changes According to that it
will modify the code.

15
Chapter 4
Existing and proposed system

4.1Existing system

India has one of the densest and prospective markets for cellular phones, and
mobile service providers have a strict policy about providing access to their
customer
bases. Many consumers activate “Do Not Disturb” services that disallow mass
publicity calls and messages. However, Bulk SMS service provider in Mumbai
maintain databases of people who are open to mass messages. This means that a
company engaging in this kind of marketing can actually reach out to a target
audience more efficiently. Not all bulk SMS reseller providers have extensive
resources however, and it is up to you to select the right vendor.
Bulk SMSs reach the target audience with greater efficiency than television
or print advertising because they reach the client directly. A message on your phone
is
something that you can always refer to later; and it doesn’t go ignored as marketing
calls often do. On the other side of the playing field, a bulk SMS reseller provider
can
reach out to thousands of people within a limited cost. While conventional
advertising
cannot guarantee the attention of your intended target audience, bulk SMSs will
allow
you a deeper reach into the market without spending as much as you would when
engaging in conventional marketing!
Moreover, in this digital world, smartphones are the best partner. Without it,
nobody survives. Even the old aged or illiterate people used to have smartphones
and
they try to read all messages. These people never read email as they don’t have an
email account.

16
Hence, there may be no doubt that Bulk SMS service will assist you to
connect with your audiences better. Get your Bulk SMS service through us
thousands
of your audience at the same time. It is believed that an SMS is opened within five
minutes of its receipt, making it an effective medium to attain out on your target
market.ies

4.2 Proposed system

The proposed system used advanced methodologies to facilitate ease of use and
makes the messages more filtered and cleaner to view .
The transactions from various apps (like gpay , phonepe , paytm etc) are arranged
dynamically based on the content they possess .
Otp’s(One Time Passwords ) are automatically from the device after a specified
amount of time which makes it more secure and helps the comtribute to the free
space on the device .
These messages are automatically converted into modules based on a timed basis as
all messages from a certain timeline are clubbed together enabling to view it easier.

Spam messages are automatically seperated from the other essential messages
which makes it easier to identify messages we dont actually need.
These spam messages are also converted into seperated folders to make them to be
deleted easier.

17
Chapter 5
Modules

The system is an App-based approach. We are going to use Android App Studio
which is a platform to make Android Apps.

5.1 Android App Studio


Android Studio provides a unified environment where you can build apps for
Android phones, tablets, Android Wear, Android TV, and Android Auto.
Structured code modules allow you to divide your project into units of
functionality that you can independently build, test, and debug.

It provides Gradle-based build support. Android-specific refactoring and quick fixes.


Lint tools to catch performance, usability, version compatibility and other problems.
It contains Templates to create Android designs and components. A rich layout
editor that allows users to drag-and-drop components even has Option to preview
layouts on multiple screen configurations. It has Built-in support for Google Cloud
Platform, enabling integration with Firebase Cloud Messaging and Google App
Engine. It even contains a Virtual Device (Emulator) to run and debug apps in the
Android studio.

5.2 Spam Filtering Process


A manually classified spam and ham messages are input or training set for a spam
filtering algorithm. The algorithm consists of the following steps

Preprocessing:
Removing irrelevant contents like stop words are the part of data preprocessing.

18
Tokenization:
Segmenting the message according to words, characters or symbols called tokens.
There are different tokenization approaches such as word tokenization, sentence
tokenization, word or character Ngrams and orthogonal sparse bigrams.

Representation:
Conversion to attribute value pairs. Selection: Selecting important attribute values
which have impact on classification rather than choosing all pairs of attribute value.

Training:
Train the algorithm with the selected attribute values.

Testing: Test the newly arrived data with the training model.

5.3 OTP Detection


Privacy concerns have always been an issue for Android users. Before Android 6
Marshmallow devices, accessing almost anything was possible from user's devices
which makes users privacy violated and vulnerable. But since Android released
request application permission before actually using it made it secure in some
manners.

Two of the major dangerous level permissions i.e., SMS and Location permissions
are most of the privacy concerning permissions. And now it's almost impossible for
new and old apps having these permissions to be published without having a very
strong use-case.

SMS / OTP detection requires SMS permissions from user. And its a common use
case for apps to auto-detect OTP while logging in through mobile verification. But
since READ_SMS and RCEIVE_SMS are not so much easier to get published on
the play store, Google launched SMS Verification APIs which does the task in-
19
place.

5.4 Transaction Detection


Transactional Monitoring in today’s world is necessary to implement variable plans
and tiers of services to our customer base. With intelligent systems being put into
place at every junction of the transactional process from payment till the evaluation
of end numbers of purchases, we sought to find an intelligent source of digital data
that can drive insight generation like no other in the market.

The transactional SMS’s from a whole lot of messages are filtered out.
Virtual passbook is created by applying ML algorithms to the messages. SMS
transaction extractor solution applies its intelligence to categorize the messages into
various expense types across products & services, purchase patterns, and credit &
insurance risks.
Duplications are removed and filtered out.
If there are any incomplete values in the data, then they are filled.

20
Chapter 6
System Architecture

21
Chapter 7
Source code

SMS Read/Write:

Permission:

<!-- To use SMS based services -->


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

Read SMS:

package com.example.readmessage;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsMessage;

public class MessageReceiver extends BroadcastReceiver {

private static MessageListener mListener;

@Override
public void onReceive(Context context, Intent intent) {
Bundle data = intent.getExtras();
Object[] pdus = (Object[]) data.get("pdus");
for(int i=0; i<pdus.length; i++){
SmsMessage smsMessage = SmsMessage.createFromPdu((byte[]) pdus[i]);
String message = "Sender : " + smsMessage.getDisplayOriginatingAddress()
+ "Email From: " + smsMessage.getEmailFrom()
+ "Emal Body: " + smsMessage.getEmailBody()
+ "Display message body: " + smsMessage.getDisplayMessageBody()
+ "Time in millisecond: " + smsMessage.getTimestampMillis()
+ "Message: " + smsMessage.getMessageBody();
mListener.messageReceived(message);
}
}

22
public static void bindListener(MessageListener listener){
mListener = listener;
}
}

Wirte SMS:

package com.example.sendsms;
import android.os.Bundle;
import android.app.Activity;
import android.app.PendingIntent;
import android.content.Intent;
import android.telephony.SmsManager;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends Activity {

EditText mobileno,message;
Button sendsms;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);

mobileno=(EditText)findViewById(R.id.editText1);
message=(EditText)findViewById(R.id.editText2);
sendsms=(Button)findViewById(R.id.button1);

//Performing action on button click


sendsms.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
String no=mobileno.getText().toString();
String msg=message.getText().toString();

//Getting intent and PendingIntent instance


Intent intent=new Intent(getApplicationContext(),MainActivity.class);
PendingIntent pi=PendingIntent.getActivity(getApplicationContext(), 0,
intent,0);

23
//Get the SmsManager instance and call the sendTextMessage method to
send message
SmsManager sms=SmsManager.getDefault();
sms.sendTextMessage(no, null, msg, pi,null);

Toast.makeText(getApplicationContext(), "Message Sent successfully!",


Toast.LENGTH_LONG).show();
}
});
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.activity_main, menu);
return true;
}

OTP Detection:

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.google.android.gms.auth.api.phone.SmsRetriever;
import com.google.android.gms.common.api.CommonStatusCodes;
import com.google.android.gms.common.api.Status;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
* BroadcastReceiver to wait for SMS messages. This can be registered either
* in the AndroidManifest or at runtime. Should filter Intents on
* SmsRetriever.SMS_RETRIEVED_ACTION.
*/
public class MySMSBroadcastReceiver extends BroadcastReceiver {

private OTPReceiveListener otpReceiveListener;

24
public MySMSBroadcastReceiver() {
}

public void init(OTPReceiveListener otpReceiveListener) {


this.otpReceiveListener = otpReceiveListener;
}

@Override
public void onReceive(Context context, Intent intent) {
if (SmsRetriever.SMS_RETRIEVED_ACTION.equals(intent.getAction())) {
Bundle extras = intent.getExtras();
if (extras != null) {
Status status = (Status) extras.get(SmsRetriever.EXTRA_STATUS);
if (status != null)
switch (status.getStatusCode()) {
case CommonStatusCodes.SUCCESS:
// Get SMS message contents
String message = (String)
extras.get(SmsRetriever.EXTRA_SMS_MESSAGE);
if (message != null) {
Pattern pattern = Pattern.compile("(\\d{4})");
// \d is for a digit
// {} is the number of digits here 4.
Matcher matcher = pattern.matcher(message);
String val = "";
if (matcher.find()) {
val = matcher.group(0); // 4 digit number
if (this.otpReceiveListener != null)
this.otpReceiveListener.onOTPReceived(val);
} else {
if (this.otpReceiveListener != null)
this.otpReceiveListener.onOTPReceived(null);
}
}
break;
case CommonStatusCodes.TIMEOUT:
if (this.otpReceiveListener != null)
this.otpReceiveListener.onOTPTimeOut();
break;
}
}
}
}

25
interface OTPReceiveListener {
void onOTPReceived(String otp);

void onOTPTimeOut();
}
}

Colour Values:

<?xml version="1.0" encoding="utf-8"?>


<resources>
<color name="purple_200">#FFBB86FC</color>
<color name="purple_500">#FF6200EE</color>
<color name="purple_700">#FF3700B3</color>
<color name="teal_200">#FF03DAC5</color>
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<color name="dark_gray">#1f1f1f</color>
<color name="gray">#373737</color>
<color name="light_gray">#d3d3d3</color>
</resources>

Chapter 8
Implementation

26
This application is designed based on Kotlin and the application is designed use to
classify the messages received.
All messages are screened and are placed on the concerned categories. This helps for
a more user -friendly and reliable use case of the application.
SMSManager class manages operations like sending a text message, data message,
and multimedia messages (MMS). For sending a text message method
sendTextMessage() is used likewise for multimedia message
sendMultimediaMessage() and for data message sendDataMessage() method is used.
The details of each function are:
sendTextMessage():
sendTextMessage(String destinationAddress, String scAddress, String text,
PendingIntent sentIntent,PendingIntent deliveryIntent, long messageId)

sendDataMessage():
sendDataMessage(String destinationAddress, String scAddress, short
destinationPort, byte[] data,PendingIntent sentIntent, PendingIntent deliveryIntent)

sendMultimediaMessage():
sendMultimediaMessage(Context context, Uri contentUri, String locationUrl,
Bundle configOverrides, PendingIntent sentIntent

Chapter 9

27
Sample output screenshots

9.1 SAMPLE XML SCREEN

9.2 SMS INTERFACES

9.3 SMS OTP DETECTION :

28
9.4 SMS TRANSACTION DETECTION :

29
9.5 SMS SPAM DETECTION :

30
Chapter 10
Result
This project is widely use full in any organizations, colleges, banking,
companies,E-Commerce, Market News, Government & Public Utilities,
Logistics, Media & Entertainment, Travel & Tourism Industry etc. Alert your
customer/user about the new updates of organization/colleges. In Logistics it use
to send the shipping updates, invoices, bills, tracking detail web URLs and much
more via an SMS. Media & Entertainment it use to invite the audience to an
FM/TV show or ask the audience to vote for their favorite contestants in your
reality show. and it also used in Travel & Tourism Industry Become a travel
buddy of your customer by sending all the itineraries and travel routes via an
SMS to make their journey more hassle-free.

31
Chapter 11
Conclusion

As there is increase in usage of text messaging day by day, the problem of SMS
spam is becoming more prevalent. Filtering SMS spam has been a major
problem in recent years. In this research work, we have used six different
machine learning algorithms such as decision tree, naive Bayes, random forest,
KNN, SVM, and AdaBoost in which ten features from the dataset are used.
There are 5574 tagged data in the sample, including 4827 messages belonging to
ham messages and 747 messages belonging to spam messages collected. With
accuracy of 99.9%, the random forest classification algorithm outperforms all
other classification algorithms. The accuracy may further be enhanced by using
hybrid soft computing models.

32
Chapter 13
Refernces

1. K. Yadav, S. K. Saha, P. Kumaraguru, and R. Kumra,“Take control of your


smses: Designing an usable spam sms filtering system,” in 2012 IEEE 13th
InternationalConference on Mobile Data Management. IEEE, 2012, pp. 352–355.

2. S. J. Warade, P. A. Tijare, and S. N. Sawalkar, “An approach for sms


spam detection.”

3. A. Narayan and P. Saxena, “The curse of 140 characters: evaluating the efficacy
of sms spam detection on android,” in Proceedings of the Third ACM workshop
on Security and privacy in smartphones & mobile devices. ACM, 2013, pp. 33–
42.

4. A. S. Onashoga, O. O. Abayomi-Alli, A. S. Sodiya, and D. A. Ojo, “An adaptive


and collaborative server side sms spam filtering scheme using artificial immune
system,” Information Security Journal: A Global Perspective, vol. 24, no. 4-6,
pp. 133–145, 2015

5. L. Leung, "Unwillingness-to-communicate and college student's motives in SMS


mobile messaging," Telematics and Informatics, vol. 24, pp. 115-129, 2007.

6. Almeida, Tiago, José María Gómez Hidalgo, and Tiago Pasqualini Silva.
"Towards sms spam filtering: Results under a new dataset." (2013): 1-18.

33
7. Mujtaba, G., and M. Yasin. "SMS spam detection using simple message content
features." J. Basic Appl. Sci. Res 4 (2014): 275-279
8.

34
9. Q. Sun, H. Qiao, and Z. Luo, “The feature updating algorithm for short
message content filtering,” Information Technology Journal, vol. 7, no. 5, pp. 790–
795, 2008.

10. I. Ahmed, D. Guan, and T. C. Chung, “Sms classification based on naïve


bayes classifier and apriori algorithm frequent itemset,” International Journal of
machine Learning and computing, vol. 4, no. 2, p. 183, 2014.

11. T. M. Mahmoud and A. M. Mahfouz, “Sms spam filtering technique based on


artificial immune system,” IJCSI International Journal of Computer Science Issues,
vol. 9, no. 1, pp. 589–597, 2012.

12. K. Yadav, P. Kumaraguru, A. Goyal, A. Gupta, and V. Naik, “Smsassassin:


crowdsourcing driven mobile-based system for sms spam filtering,” in Proceedings
of the 12th Workshop on Mobile Computing Systems and Applications. ACM, 2011,
pp. 1–6.

13. T. A. Almeida, J. M. G. Hidalgo, and A. Yamakami, “Contributions to the


study of sms spam filtering: new collection and results,” in Proceedings of the 11th
ACM symposium on Document engineering. ACM, 2011, pp. 259–262.

14. M. Poorshahsavari and O. Pourgalehdari, “Enhancing the rate of accuracy and


precision in spam filtering in farsi sms.”
15. Hidalgo JMG, Bringas GC, Sánz EP, García FC (2006) Content based SMS
spam filtering. In: ACM symposium on document engineering, pp 107–114. ACM.
https://doi.org/10.1145/116 6160.1166191

16. 3.A. A. Badawi, L. Hoang, C. F. Mun, K. Laine,

17. (2015). Wechat-free messaging& calling app [Online]. Available:


http://www.wechat.com/

18. (2015). Whatsapp web [Online]. Available: http://web.whatsapp. com/

19. T. Sto€ber, M. Frank, J. Schmitt, and I. Martinovic, “Who do you

20. sdsync you are?: Smartphone fingerprinting via application behav- iour,” in
Proc. 6th ACM Conf. Security Privacy Wireless Mobile Netw., 2013, pp. 7–12.

21. M. Conti, L. V. Mancini, R. Spolaor, and N. V. Verde, “Can’t you hear me


knocking: Identification of user actions on android apps via traffic analysis,” in Proc.
35
5th ACM Conf. Data Appl. Security Pri- vacy, 2015, pp. 297–304.

36

You might also like