0% found this document useful (0 votes)
45 views35 pages

SMSreport2 PDF

Uploaded by

23151296
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)
45 views35 pages

SMSreport2 PDF

Uploaded by

23151296
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/ 35

Chapter 1 Introduction

1.1 INTRODUCTION

In today’s digital age, communication plays a pivotal role in connecting people, facilitating personal
and professional interactions, and enabling businesses to thrive. While numerous communication
platforms exist, offering sophisticated features like instant messaging, multimedia sharing, and
voice or video calling, many users still require simple, streamlined tools for sending basic text
messages. Whether for sending quick updates, reminders, or urgent notifications, a lightweight,
easy-to-use application can be more efficient than feature-rich messaging platforms, particularly
when the task at hand is straightforward.

With the advent of smartphones, SMS (Short Message Service) became a widely used method of
communication. Despite the rise of internet-based messaging apps such as WhatsApp, Telegram,
and others, SMS remains an essential tool for reaching people who may not have internet access or
for sending short and direct messages. The demand for simplicity in sending SMS is still relevant,
particularly for users who may not be tech-savvy or require a more focused and minimalistic
approach. This is where the Simple SMS App comes into play.

The Simple SMS App is designed to fulfill the need for a basic, user-friendly desktop application
that allows individuals to send short messages with minimal effort. Built using Python’s Tkinter
library, this app provides a graphical user interface (GUI) where users can enter the recipient's
name, mobile number, and message. It incorporates input validation to ensure data integrity, such as
checking whether the mobile number contains exactly 10 digits and ensuring that no fields are left
blank.

The application’s design prioritizes ease of use, allowing users to complete the task of sending a
message with just a few simple steps. The focus on simplicity and efficiency makes this tool
suitable for a wide range of users, from those who need to send quick reminders or notifications to
those unfamiliar with complex messaging applications. By minimizing distractions and focusing on
the core functionality, the Simple SMS App delivers an experience that balances usability with
basic functionality.

While this app is primarily educational and simulates the process of sending messages, it can be
easily extended to interface with actual SMS gateways, enabling real-world usage. The current
implementation includes essential features such as data validation and user feedback through pop-

~1
~
up messages. For instance, if the mobile number is incorrect or a field is missing, an error
message is

~2
~
displayed, guiding the user to correct their input before proceeding. Once the message is
successfully “sent,” a confirmation is provided, giving users confidence that their task has been
completed.

In an era where many software applications are becoming increasingly complex, there remains a
place for tools that focus on specific, straightforward tasks without overwhelming the user. The
Simple SMS App is an example of such a tool—an application that addresses a fundamental need in
a minimalist and intuitive way. While it does not compete with the more advanced features of
modern messaging platforms, its value lies in its simplicity, making it an excellent solution for
those who seek efficiency and ease of use in sending short text messages. As a result, this app can
serve as both a learning tool for developers exploring Python GUI development and a practical
utility for individuals in need of a basic messaging solution.

1.2 Problem Statement

In today's fast-paced world, effective communication is crucial. Many people need a simple, user-
friendly tool to send SMS-like messages quickly without the complexity of modern messaging
applications. Individuals may need to send short messages to friends, colleagues, or clients and
require a basic, straightforward interface for this purpose.

The challenge is to design a lightweight desktop application that allows users to input the recipient's
name, their mobile number, and a message, and then send it with minimal effort. The application
should validate user input, ensuring the mobile number is correctly formatted and that no required
fields are left empty. Upon successful completion, the user should receive confirmation that the
message was sent.

This program is a simplified SMS application with the following requirements:

 Allow users to input the recipient's name, mobile number, and message.

 Validate that the mobile number is exactly 10 digits and contains only numeric characters.

 Display appropriate error messages if validation fails or fields are left blank.

 Confirm to the user once the message has been successfully sent.

The solution should be easy to use and intuitive, minimizing user error while maintaining a
functional design.

1.3 Objective

The objective of the Simple SMS App is to provide a lightweight and user-friendly desktop
application for sending short text messages. This application aims to address the need for an
~3
~
efficient, straightforward communication tool that allows users to input basic information—
such as the

~4
~
recipient's name, mobile number, and message—while ensuring that the data is validated for
correctness.

The specific objectives of the app are as follows:

1. Simplify the message-sending process: The app offers an intuitive interface where users can
quickly send messages without the complexity of modern messaging platforms.

2. Ensure data validation: The app includes validation mechanisms, such as ensuring the mobile
number is exactly 10 digits and checking that no required fields (name, mobile number, message)
are left empty, reducing the chance of user error.

3. Provide user feedback: Users receive clear feedback on both successful message submissions
and errors, such as missing fields or incorrect phone number formats.

4. Simulate message sending: While the current version of the app is educational and does not send
actual SMS messages, it simulates the process by showing a confirmation message once the data
is correctly inputted.

5. Serve as a foundation for future development: The app is designed with simplicity in mind but
can be extended in the future to integrate with SMS gateways for real-world use. Additionally, it
can be a learning tool for developers interested in building Python GUI applications.

By focusing on simplicity and effectiveness, the Simple SMS App provides a solution for users who
need to send short messages quickly, ensuring a smooth and user-friendly experience.

1.4 Methodology

The development of the Simple SMS App followed a structured approach to ensure that the
application met its objectives of simplicity, usability, and functionality. This methodology outlines
the key phases involved in designing, developing, and testing the application.

1. Requirements Gathering

The first step in the methodology was to identify the core functionalities that the application should
offer. These requirements were derived from the need for a basic tool that allows users to:

 Input a recipient's name.

 Enter a 10-digit mobile number.

 Write a short message.

 Send the message with validation and confirmation.

~5
~
Given the simplicity of the intended application, the requirements focused on creating a user-
friendly interface with essential validation features to guide the user in correctly entering the
necessary information.

2. Design

Once the requirements were clear, the design phase began. This involved outlining the structure and
flow of the application. The primary design considerations included:

 User Interface (UI) Design: The layout was kept simple and minimalistic, with three key input
fields (recipient, mobile number, and message) and a single "Send" button. The design was
structured to minimize user error and ensure ease of use for all types of users.

 Validation Logic: A critical part of the design was implementing validation logic to check for:

o Empty fields (ensuring the user fills in the recipient’s name, mobile number, and message).

o Proper mobile number format (ensuring that the mobile number contains exactly 10 digits
and is numeric).

 User Feedback: It was essential to provide real-time feedback through message boxes. Error
messages would notify the user if validation failed, and a confirmation message would be
displayed if the message was successfully sent.

3. Development

The development phase involved using Python’s Tkinter library to build the graphical user interface
(GUI) and implement the necessary logic to handle user inputs and validation. Key components
developed include:

 Input Fields: Tkinter.Entry widgets were used for the recipient and mobile number, while a
Tkinter.Text widget was employed for the message body to allow multi-line input.

 Validation and Error Handling: The send_message function was designed to capture input from
the fields, perform the validation checks, and handle potential errors. For instance, if the mobile
number is not exactly 10 digits or non-numeric characters are entered, an error message is
displayed using messagebox.showerror. Similarly, if any fields are left blank, the user is prompted
to complete all fields.

 Message Confirmation: Upon successful validation, a confirmation message is displayed using


messagebox.showinfo, showing the user the recipient’s name, mobile number, and the message
they are about to send.

~6
~
4. Testing

The testing phase focused on verifying the functionality and user experience of the app. The
following tests were conducted:

 Input Validation Testing: Various combinations of correct and incorrect mobile numbers were
tested to ensure that the app correctly identifies invalid inputs (e.g., fewer or more than 10 digits,
non- numeric characters). Empty fields were also tested to ensure appropriate error handling.

 User Feedback Testing: The feedback provided to the user, including error messages and
confirmation dialogs, was tested for clarity and ease of understanding.

 Usability Testing: The overall flow of the app, from inputting data to receiving confirmation, was
tested to ensure a seamless user experience.

5. Iteration and Refinement

Based on the testing phase, small adjustments were made to improve user feedback and enhance
error handling. This iterative process allowed for refinements in the validation logic and ensured
that the application performed smoothly under various scenarios.

~7
~
Chapter 2 Literature Survey

2.1. SMS (Short Message Service) Technology

SMS, or Short Message Service, has been a widely used communication technology since its
inception in the 1990s. Research on SMS indicates its enduring relevance, even as more advanced
messaging platforms have emerged. According to Verma et al. (2014), SMS remains a key method
of communication, particularly for sending notifications, alerts, and short personal messages due to
its simplicity, wide availability, and independence from internet access. This makes it an ideal
choice for users who do not rely on internet-based applications, as well as for businesses and
services that need to reach customers without requiring them to have smartphones or internet
access.

While newer messaging platforms such as WhatsApp and Telegram have grown in popularity,
studies show that SMS is still valuable, especially in regions with limited internet connectivity. The
GSMA Mobile Economy Report (2020) highlights that SMS is a critical communication channel for
businesses and services, particularly for sending time-sensitive information such as one-time
passwords (OTPs), transactional messages, and service alerts.

In the context of this project, the Simple SMS App draws on the simplicity of SMS communication
to create a minimalistic interface for users to send short messages easily. The app simulates the
SMS process but does not yet integrate actual SMS gateway technology, which is a possible future
enhancement.

2.2 Graphical User Interface (GUI) Design in Python

GUI development has been an essential area of research in software engineering, with the goal of
making applications more accessible and intuitive for users. Python’s Tkinter library has become
one of the most popular tools for developing desktop-based GUI applications. According to Kurt et
al. (2019), Tkinter is favored for its simplicity and ease of use, making it an ideal choice for
developing lightweight applications like the Simple SMS App.

Zhu et al. (2017) emphasize that Python, with its extensive libraries and cross-platform capabilities,
has increasingly become a go-to language for developing GUIs. The simplicity of Python’s syntax
and its support for multiple paradigms make it suitable for both novice and experienced developers.
For small-scale applications, Tkinter offers the ability to quickly prototype and develop functional
user interfaces with minimal effort.

~8
~
The Simple SMS App, Tkinter was chosen because of its:

 Cross-platform compatibility (Windows, macOS, and Linux).

 Simple widgets for creating text fields, buttons, and message boxes.

 Rapid development cycle, allowing quick iteration during the development phase.

2.3 Input Validation and User Feedback in GUI Applications

Input validation is an essential feature in any GUI-based application that interacts with users. Proper
validation ensures that the user provides correct and meaningful data, reducing the risk of errors and
improving overall usability. According to Shneiderman et al. (2016), a well-designed GUI must not
only be intuitive but also include robust error-handling mechanisms to guide users when they make
mistakes.

The Simple SMS App employs input validation for critical fields, such as the mobile number. The
phone number validation ensures that the user inputs a 10-digit numeric value, which is a basic
requirement for sending an SMS in many countries, including the United States. The
implementation of validation aligns with research that highlights the importance of user feedback
loops in GUIs. Nielsen (1995) discusses how timely and informative feedback plays a crucial role in
improving the user experience. This app follows these guidelines by providing users with instant
feedback through error messages if any fields are incomplete or invalid, and success messages when
the input is correct.

2.4 User-Centered Design and Simplicity in Applications

Research in human-computer interaction (HCI) emphasizes the importance of user-centered design,


particularly when developing applications for a broad user base. Norman (2013) discusses how
simple interfaces are often the most effective, especially when designed for specific tasks. The
concept of "simplicity" in design has been extensively explored in the field of software usability,
where less complexity leads to better user satisfaction and reduces cognitive load.

The Simple SMS App reflects these principles by focusing on minimalism. It limits the number of
features to only what is necessary for the task of sending a message: entering the recipient's name,
the mobile number, and the message itself. By removing extraneous features, the app ensures that
the user experience remains straightforward and easy to understand, even for less tech-savvy users.

 Similar Applications and Solutions

Several applications and software solutions are available for sending SMS messages, many of
which are integrated with more complex functionalities. Popular messaging platforms such as

~9
~
Google Messages, Apple iMessage, and WhatsApp provide features far beyond the scope of this
project,

~ 10
~
including multimedia sharing, group chats, and internet-based messaging. However, Chiang and
Chen (2015) argue that there is still value in applications that focus on core functionalities without
the additional complexity of modern messaging apps.

The Simple SMS App distinguishes itself by simulating the core function of SMS sending while
prioritizing ease of use. Many existing solutions that send actual SMS messages integrate with
third- party APIs like Twilio or Nexmo, which offer messaging services but often require more
advanced user knowledge for setup. The current app provides a foundation for those looking to
understand the basics of SMS messaging and Python-based GUI development without needing
external dependencies.

2.5 REAL-WORLD APPLICATIONS

The provided SMS application simulates a basic messaging interface, but in the real world, it could
be developed into a more practical tool with actual SMS-sending capabilities by integrating APIs.
Here are potential real-world applications of this program:

1. Customer Support and Notifications

Businesses could use an SMS application to send out important notifications, reminders, or alerts to
customers:

 Appointment Reminders: Clinics, salons, or service centers could use such an app to send
reminders to customers about upcoming appointments.

 Order Updates: E-commerce platforms could notify customers of their order status (shipped, out
for delivery, delivered).

 Event Reminders: Event organizers could use this app to send SMS reminders about upcoming
events, meetings, or deadlines.

To apply this in the real world, an SMS API like Twilio, Nexmo, or Plivo could be integrated into
the app to handle the actual SMS delivery.

2. Personal Use for Quick Messaging

The app could be turned into a personal tool for sending customized SMS to friends or family
members, such as:

 Sending Invitations: Inviting people to events like birthday parties, family reunions, or social
gatherings.

~ 11
~
 Personal Alerts or Announcements: Sending out personal announcements, such as birth
announcements or celebratory messages.

By adding an SMS gateway integration, users could automate sending to multiple contacts as well.

3. Emergency Notification System

This app could be adapted into a mass emergency alert system for local communities, organizations,
or schools. In case of emergencies (natural disasters, safety alerts), admins could send mass
notifications via SMS:

 Crisis Alerts: Notifying citizens about safety protocols during emergencies like fires, floods, or
public health alerts.

 School or Office Closures: Administrators could send mass messages regarding sudden closures
due to weather, power outages, etc.

For this, bulk messaging features could be added alongside integration with emergency
management systems.

4. Business Marketing and Promotional Campaigns

Many businesses rely on SMS marketing to reach customers directly with promotions, offers, or
coupons. This app could be expanded to manage:

 Promotional Messages: Sending coupons or offers to customers who have opted in for text
message promotions.

 Sales Announcements: Notifying customers of upcoming sales, limited-time discounts, or product


launches.

With the integration of a bulk SMS service provider, the app could handle sending promotional
messages to a list of subscribed users.

5. Logistics and Delivery Management

The app could be adapted for logistics companies to send real-time delivery updates to customers,
drivers, or suppliers:

 Delivery Confirmation: Sending SMS to recipients confirming package delivery, along with
relevant details like the tracking ID.

 Driver Instructions: Notifying drivers with delivery instructions, changes, or route updates.

~ 12
~
Integrating the app with a logistics platform or CRM (Customer Relationship Management) system
would allow for seamless updates.

6. Healthcare and Appointment Management

Clinics and hospitals could use such an app to manage and remind patients of upcoming
appointments or prescription refills:

 Appointment Scheduling: Sending SMS reminders for scheduled appointments and encouraging
patients to confirm or reschedule.

 Medical Alerts: Notifying patients about prescription renewals, health checkups, or follow-up visits.

In this case, the app could integrate with a healthcare management system to automatically send
reminders.

7. Automated Responses and Chatbots

This SMS app could be extended to handle automated responses for customer queries. It could be
programmed to:

 Respond to specific keywords with predefined messages (e.g., a customer texts "HOURS" and
receives the business's working hours in return).

 Act as a simple chatbot that sends answers to frequently asked questions, promotional materials,
or updates.

For this, you could integrate natural language processing (NLP) tools and SMS APIs.

2.6 Improved SMS-3M design algorithm

The SMS method can be implemented to design using meridian and skew ray-bundles. In this work we
will used the SMS-3M, in which three meridian ray-bundles are used to design three aspheric surfaces.
Although the SMS surfaces are designed using only meridian rays, the skew rays will also be very well
controlled within the Phase I optimization process described in Section 4. The standard SMS procedure
for imaging design is monochromatic, and consists of twosteps : selection of the central segments of the
surfaces and recursive generalized Cartesian oval calculations. The selection of the central segments plays
an important role in the SMS calculation because the subsequent calculation of the new segments relies
on them. In traditional optical designs, central segment curves are usually determined from paraxial
approximation. However, these conditions are not suitable for the SMS calculation, becauseC2
smoothness at the connection points between the central curves and grown segments is not guaranteed.
The lack of C2 smoothness will finally result either in instabilities of the algorithm or poor final fitting of
the curves (represented by NURBS in the SMS calculation process) with overall polynomial a spheres,
~ 13
~
which is of

~ 14
~
interest for Phase 2 of the design. The three meridian ray bundles selected for the SMS design correspond
to the rays emitted from 3 object points placed symmetrically about the optical axis, as shown in Fig. 1.
V1, V2and V3 are the central vertices of the initial curves that can be defined beforehand by the designer
as a degree of freedom. Consider the rays R1, R2 and R3, which all pass through the vertex of Curve 2:
V2. R2 is the on-axis ray emitted from the on-axis pointObj2 to reach its on-axis image point. R1 is
emitted from an off-axis point Obj1 to reach its prescribed off-axis image point Img1 and R3 is its
symmetrical counterpart.

Fig. 2.1 Ray trajectories from the design object points to their corresponding image points used to design
the central segments.

The trajectory of R2 from Obj2 to Img2 is guaranteed by normal incidence on all surfaces. The condition
that R1 emitted from Obj1 reaches Img1 sets up a relationship between the slopes of Curve 1 and Curve 2
on their rims. Furthermore, the conditions of C2 smoothness at these edge points set up a second
constraint on the curvatures of Curve 1 and Curve 2 on the rims. This second constraint is obtained by
computing the propagation using a generalize dray-tracing of the meridian curvature of the wave-fronts
around R1 and forcing the center of curvature of that wave-front to coincide with. Equation establishes
the relationship between the curvature of the incoming wave-front ki along a meridian ray, the curvature
of the outgoing wave-front and the curvature of the intersected curve kc. Angles α and αr are incident and
refracted angles with respect to the normal. A similar law for reflective surface can be obtained by
changing nr to -ni Since there are two conditions to be fulfilled, two degrees of freedom are needed,
which means that Curves 1 and 3 can be represented, for instance, as spheres, the two radii being
calculated with these conditions. The solution is in general not unique. Different solutions usually
represent initial curves with concave or convex shapes, which lead to different families of optical design.

~ 15
~
2.7 Application-to-person (A2P) SMS

While SMS reached its popularity as a person-to-person messaging, another type of SMS is growing fast:
application-to-person (A2P) messaging. A2P is a type of SMS sent from a subscriber to an application or
sent from an application to a subscriber. It is commonly used by businesses, such as banks, e-gaming,
logistic companies, e-commerce, to send SMS messages from their systems to their customers.

In the US, carriers have traditionally preferred that A2P messages be sent using a short code rather than a
standard long code. In 2021, US carriers introduced a new service called A2P 10DLC, supporting the
used of 10-digit long codes for A2P messages. In the United Kingdom A2P messages can be sent with a
dynamic 11 character sender ID; however, short codes are used for OPTOUT commands.

Application-to-Person (A2P) SMS refers to the process where an application or software sends a message
to a person’s mobile phone via SMS. It is typically used by businesses or organizations to communicate
with individuals for a wide variety of purposes, ranging from notifications and alerts to marketing
campaigns. Unlike person-to-person (P2P) messaging, where individuals send text messages to each
other, A2P SMS involves automated systems sending messages in bulk or on-demand to large groups of
recipients. This communication method is increasingly prevalent in today’s business environment because
of its effectiveness in reaching people directly.

Key Features and Uses of A2P SMS

A2P SMS is employed in numerous sectors and for a variety of purposes. Here are some of the key areas
where it is commonly applied:

1. Alerts and Notifications: A2P SMS is ideal for sending important alerts and notifications to
individuals. This can include reminders for appointments, account-related updates, two-factor
authentication (2FA) codes, and service disruptions. For example, banks frequently use A2P SMS
to notify customers about suspicious activity on their accounts, while hospitals send appointment
reminders to reduce no-show rates.

2. Marketing and Promotional Messages: Businesses often use A2P SMS for marketing purposes,
sending promotional offers, discounts, or coupons to their customers. SMS marketing is highly
effective due to the high open rate of text messages (often over 90%) compared to other forms of
digital communication like email. With A2P, companies can engage their audience with time-
sensitive offers or announcements about new products or services.

3. Customer Support: Many businesses use A2P SMS to facilitate customer support. This can
include sending order confirmations, delivery updates, or answering common queries through
automated

~ 16
~
systems. For example, e-commerce platforms use A2P SMS to inform customers when their
orders are shipped or delivered.

4. Two-Factor Authentication (2FA): Security-sensitive industries such as banking and technology


often rely on A2P SMS to send one-time passwords (OTPs) or verification codes to users as part
of the two-factor authentication process. This adds an additional layer of security to user accounts
by requiring them to verify their identity via a mobile phone.

5. Surveys and Feedback: Many companies use A2P SMS to collect feedback from customers
through surveys. After a service is provided, companies can automatically send a message asking
customers to rate their experience or provide feedback. This helps businesses improve their
service and customer satisfaction.

Benefits of A2P SMS

1. High Open and Response Rates: One of the major advantages of A2P SMS is its high open rate.
Studies show that over 90% of SMS messages are read within a few minutes of being received.
This makes it a very effective channel for time-sensitive information.

2. Direct Communication: SMS allows businesses to communicate directly with their customers
without the distractions often found on social media or email. There’s no intermediary filtering or
promotion folders like with email, ensuring messages reach the recipients’ inboxes.

3. Global Reach: SMS technology works on all mobile phones, regardless of internet connectivity or
smartphone ownership. This makes A2P SMS an effective tool for reaching a global audience,
including in areas with limited internet access.

4. Automation and Scalability: A2P SMS is automated and can scale to send thousands or millions of
messages at once, making it suitable for large-scale operations. Businesses can schedule messages,
personalize them for individual customers, and track delivery reports in real time.

Challenges and Regulations

While A2P SMS offers numerous advantages, it is also subject to strict regulations to prevent spam and
ensure user privacy. For instance, countries have established regulations requiring businesses to obtain
explicit consent from individuals before sending them SMS messages. These laws, such as the GDPR in
Europe or the Telephone Consumer Protection Act (TCPA) in the U.S., are designed to protect consumers
from unsolicited messages.

~ 17
~
Chapter 3 Flowchart And Algorithm

3.1 Flowchart

The flowchart appears to depict the workflow for the Simple SMS App created using Python's
Tkinter library. Here’s an explanation of each step in the flowchart:

Fig 3.1 Flowchart

1. Start SMS App

This step indicates the beginning of the program where the application is started. The user initiates
the app, and the graphical user interface (GUI) is loaded.

2. Initialize GUI

In this step, the program initializes the Tkinter GUI. The initialization process includes setting up
the main window and preparing it for further actions.

3. Create Tkinter root window

A root window is created using Tkinter, which serves as the base window for the app. This window
will hold all the widgets (labels, buttons, text fields, etc.) needed for the app.

4. Set window title and geometry

The title of the window (such as "Simple SMS App") is set, and the window size is defined (e.g.,
400x350 pixels) using the geometry() method.

~ 18
~
5. Create and pack Recipient label and entry field

A label prompting the user to input the recipient’s name is created and displayed (packed) in the
window. An entry field is also created where the user can type the recipient's name.

6. Create and pack Mobile Number label and entry field

Similar to the recipient’s name, a label and entry field are created and packed to collect the
recipient’s mobile number. The user is expected to enter a 10-digit mobile number here.

7. Create and pack Message label and text area

A label prompting the user to write a message is added to the window. Additionally, a text area is
created using Tkinter.Text to allow the user to input multiple lines of text for the message.

8. Create and pack Send button with command

A button labeled "Send" is created. The button is configured with a command, which links to a
function (in this case, send_message) that processes the user’s input once the button is clicked.

9. Send Message

When the "Send" button is clicked, the program proceeds to retrieve the values input by the user in
the recipient’s name, mobile number, and message fields.

10. Get values from Recipient, Mobile Number, and Message fields

The entered values are fetched from the respective input fields (recipient’s name, mobile number,
and message). This data is stored in variables for validation and further processing.

11. Validate if all fields are filled

 A validation check is performed to ensure that none of the fields (name, mobile number, message)
are left blank. If any fields are empty, an error message will be triggered.

 If fields are missing:

o Missing fields: An error message box will be displayed indicating that all fields must be
filled.

 If all fields are filled:

o Validate if Mobile Number is exactly 10 digits: The program checks if the mobile number
entered is exactly 10 digits long.

 If the mobile number is invalid:

~ 19
~
 Mobile number invalid: The user will be shown an error message that the
mobile number must be exactly 10 digits.

 If the mobile number is valid:

 Compose confirmation message with details: A message is composed that


includes the recipient’s name, mobile number, and message. This message
will be displayed as confirmation to the user.

12. Display confirmation message using Tkinter messagebox

A confirmation pop-up appears showing the recipient’s name, mobile number, and the message
content. The message confirms that the SMS has been successfully "sent" (simulated in this case).

13. End SMS App

After displaying the confirmation message, the program concludes the SMS sending process.

14. Run Tkinter Main Loop

The Tkinter main loop is executed to keep the application running, allowing the user to interact
with the GUI until the window is closed.

15. End Tkinter

This step marks the termination of the Tkinter app when the user closes the application window.
The program stops running.

3.2 Algorithm

1. Start

Begin the program execution.

2. Initialize GUI

 Create the main window (root) using Tkinter.

 Set the title of the window to "Simple SMS App".

 Set the window size to 400x350 pixels.

3. Create Widgets

 Add the Recipient Label and Recipient Entry Field for the user to input the
recipient’s name.

~ 20
~
 Add the Mobile Number Label and Mobile Number Entry Field for the user to input
the 10-digit mobile number.

 Add the Message Label and Message Text Box for the user to input the message.

 Add the Send Button, which triggers the message sending function.

4. Wait for User Input

Allow the user to fill in the recipient’s name, mobile number, and message.

5. On Send Button Click

When the user clicks the "Send" button, call the send_message() function.

6. Retrieve Input Data

Fetch the entered data from the Recipient Entry, Mobile Number Entry, and Message
Text fields.

7. Validate Input

 Check for empty fields:

o If any field (recipient, mobile number, or message) is empty, display an error


message using messagebox.showerror().

o If all fields are filled, proceed to the next step.

 Check if the mobile number is valid:

o Ensure the mobile number contains exactly 10 digits and consists of only
numeric characters.

o If the number is invalid, display an error message using


messagebox.showerror().

o If the number is valid, proceed to the next step.

8. Compose Confirmation Message

If all validations pass, compose a confirmation message that includes the recipient’s
name, mobile number, and the message content.

9. Display Confirmation

Use messagebox.showinfo() to display a pop-up window with the composed


confirmation message.
~ 21
~
10. End

 Close the pop-up confirmation once the user acknowledges it and return to the main
window.

 Allow the user to either exit the app or input a new message.

11. Run Main Loop

 Keep the application running using the Tkinter main loop until the user closes the
window.

12. Terminate Program

 When the user closes the window, terminate the program and end the application.

Code:-

import tkinter as tk

from tkinter import messagebox

class SMSApp:

def init (self, root):

self.root = root

self.root.title("Simple SMS

App")

self.root.geometry("400x350")

# Recipient Name

self.recipient_label = tk.Label(root, text="Recipient:")

self.recipient_label.pack(pady=5)

self.recipient_entry = tk.Entry(root, width=40)

~ 22
~
self.recipient_entry.pack(pady=5)

~ 23
~
# Mobile Number

self.mobile_label = tk.Label(root, text="Mobile Number (10 digits):")

self.mobile_label.pack(pady=5)

self.mobile_entry = tk.Entry(root, width=40)

self.mobile_entry.pack(pady=5)

# Message Input

self.message_label = tk.Label(root, text="Message:")

self.message_label.pack(pady=5)

self.message_text = tk.Text(root, width=40, height=8, wrap="word")

self.message_text.pack(pady=5)

# Send Button

self.send_button = tk.Button(root, text="Send", command=self.send_message)

self.send_button.pack(pady=20)

def send_message(self):

recipient = self.recipient_entry.get()

mobile_number =

self.mobile_entry.get()

message = self.message_text.get("1.0", tk.END).strip() # Retrieve text from Text widget

# Validation for empty fields


~ 24
~
if not recipient or not mobile_number or not message:

~ 25
~
messagebox.showerror("Error", "All fields must be filled!")

return

# Validation for mobile number

if not mobile_number.isdigit() or len(mobile_number) != 10:

messagebox.showerror("Error", "Mobile number must be exactly 10 digits!")

return

# Pop-up message with details and confirmation

confirmation_message = (

f"Recipient: {recipient}\n"

f"Mobile Number: {mobile_number}\n"

f"Message: {message}\n\n"

"Message sent successfully!"

messagebox.showinfo("Message Sent", confirmation_message)

# Initialize and run the app

root = tk.Tk()

app = SMSApp(root)

root.mainloop()

~ 26
~
Chapter 4 Technology Used

4.1 Technologies Used in the SMS App:

1. Python 3.6:

 Python is a general-purpose programming language that is easy to learn and use.


Python's simple syntax allows developers to write and maintain code quickly.

 Python 3.6 is the latest version and is widely used for various application types,
including web development, data analysis, automation, and more.

 Why Python 3.6?

o Python 3 offers improved features, cleaner syntax, and better support for
Unicode, making it ideal for modern software development. It also includes
performance enhancements over previous versions like Python 3.

2. Tkinter (GUI Framework):

 Tkinter is the most widely used GUI framework for Python. It provides an easy way
to create graphical user interfaces by using widgets like buttons, labels, text boxes,
and more.

 Tkinter is a thin object-oriented layer on top of the Tk GUI toolkit, which is a part
of the Tcl/Tk framework.

 Why Tkinter?

o Tkinter is the default GUI library for Python and doesn't require installation
as it comes bundled with Python.

o It is simple and lightweight, making it ideal for creating small desktop


applications.

o Tkinter allows for quick prototyping with minimal code and is cross-
platform, working on Windows, macOS, and Linux.

3. Messagebox (Tkinter submodule):

 The messagebox module is a part of Tkinter and is used for displaying message
boxes in the GUI. These are useful for interacting with the user by displaying
information, warnings, errors, or success messages.

~ 27
~
 Why Messagebox?

It simplifies the process of creating pop-up messages for users, which is useful
for showing feedback (both errors and confirmations) without needing to
manually create custom dialog boxes.

4.2 Versioning and Dependencies:

 Python Version: Python 3.6 (most likely 3.6 or later) is recommended for this program,
as it ensures compatibility with the latest syntax, libraries, and features of Python.

 Tkinter Version: Tkinter version is typically bundled with the Python version, and no
separate installation is required.

o For Python 3.6, Tkinter is included by default in most distributions. If you're using
a minimal installation of Python, you may need to install it separately via the
command pip install tk if it’s not pre-installed

~ 28
~
Chapter 5 Result

When we run the Program or the Line of code then :-

1. User Interface

The app creates a graphical window with the following UI elements:

 Recipient Field: A Label prompting the user to enter the recipient's name, followed by an Entry
widget to type the name.

 Mobile Number Field: A Label prompting for a mobile number (10 digits), and an Entry widget
to input the number.

 Message Field: A Label prompting for the message, and a Text widget (multi-line input) to write
the message.

 Send Button: A button labeled "Send", which triggers the message sending logic when clicked.

Fig 5.1 Output

~ 29
~
2. Sending the Message Logic

When the user clicks the "Send" button:

 The program collects the inputs from the Entry and Text widgets:

o Recipient: From the recipient_entry (the recipient's name).

o Mobile Number: From the mobile_entry (the 10-digit phone number).

o Message: From the message_text widget.

Fig 5.2 Message Dialog

3. Success Dialog or Error Dialog

If the inputs pass validation, the app shows a pop-up window (messagebox.showinfo) confirming that the
message was "sent successfully." It displays the following details:

 The recipient's name

 The mobile number

 The message text

~ 30
~
Fig 5.3 Success dialog

 If any of the fields (recipient, mobile number, or message) are empty, an error dialog
(messagebox.showerror) will appear, saying "All fields must be filled!"

Fig 5.4 Error Dialog

 If the mobile number is not exactly 10 digits or contains non-digit characters, another error dialog
will show up with the message "Mobile number must be exactly 10 digits!"

Fig 5.5 Error Dialog

~ 31
~
Chapter 6 Conclusion and Future Scope

6.1 Future Scope:

While the Simple SMS App effectively simulates an SMS messaging process, there is significant room for
enhancement and further development. Some future improvements and features that can be added include:

1. Integration with SMS API:

o To transform the app into a fully functional SMS sender, it can be integrated with real-
world SMS gateways like Twilio or Nexmo. This would enable the app to send actual
SMS messages to mobile numbers over the internet.

o The integration would involve using APIs to send messages, handle errors, and track
message statuses.

2. Support for Multiple Recipients:

o Currently, the app supports only one recipient. The future version could allow sending
messages to multiple recipients by accepting a list of phone numbers or a group.

o This could be implemented through a multi-select option or a text box that allows entering
multiple numbers separated by commas.

3. Scheduling Messages:

o Adding a feature for scheduling messages to be sent at a later time could be useful. This
would involve adding a date-time picker in the UI and modifying the message-sending
function to handle scheduled deliveries.

4. User Authentication:

o To ensure the security of the app, user authentication (such as login and password
protection) could be added. This would be especially important if integrating with a third-
party SMS API, as user credentials might be needed for API access.

5. Message Templates:

~ 32
~
o Users could benefit from predefined message templates (such as "Happy Birthday!" or
"Reminder for meeting") that can be selected from a dropdown or template list. This would
make the app more user-friendly for repeated use.

6. Message History and Logs:

o Adding a history feature where sent messages are stored and displayed would be valuable.
This could include showing the recipient, message content, and delivery status.

o A logging system could also track sent messages, timestamps, and any errors encountered,
making the app more robust.

7. Mobile Application Version:

o To extend the reach of the app, a mobile version could be developed. Using frameworks
like Kivy or Flutter, the app could be ported to mobile devices for Android and iOS,
providing users with the ability to send messages directly from their phones.

8. Localization and Internationalization:

o The app could be expanded to support multiple languages and regions. This could involve
adding language preferences and formatting phone numbers according to international
standards.

6.2 Conclusion

The Simple SMS App is a basic yet functional desktop application built using Python 3.x and the Tkinter
library. It allows users to input a recipient's name, a mobile number, and a message, simulating the
process of sending an SMS. The application validates the user inputs, ensuring that all fields are filled and
that the mobile number is exactly 10 digits long. Once validated, the app displays a confirmation
message, simulating a successful message delivery.

This project demonstrates the power and simplicity of using Python for GUI-based applications and
Tkinter for building cross-platform, lightweight desktop apps. The validation checks and user-friendly
pop-ups enhance the overall experience, ensuring that the app is intuitive and easy to use.

~ 33
~
References

1. G. Chaudhri, R. Borriello and W. Thies.FoneAstra: Making Mobile Phones Smarter.


In NSDR, 2010.
2. E. Oliver. Characterizing the transport behaviour of the short message service. In
MobiSys '10.ACM, 2010.

3. https://www.twilio.com/docs/usage/api/send-

4. https://developer.nexmo.com/messaging/sms/overview
5. https://kivy.org/doc/stable/
6. https://www.geeksforgeeks.org/python-tkinter-
7. https://stackoverflow.com/questions/tagged/tkinter
8. https://realpython.com/python-gui-tkinter/

~ 34
~

You might also like