Sriki Internship Report
Sriki Internship Report
BACHELOR OF COMPUTER
APPLICATIONS
Of
Submitted by
SRIKANTH A
U18GH21S0099
BCA
Nethra N
Assistant Professor
Department Of BCA
2023-2024
Page 1
CERTIFICATE
This to certify that the internship entitled
SRIKANTH A
U18GH21S0099
BCA
Rajeshwari V Dr B G Bhaskara
Department Of BCA Seshadripuram College
Seshadripuram College
Page 2
Page 3
Student Declaration
during internship duration from 23nd May 2024 to 23nd June 2024,
VI Semester BCA.
Signature
Srikanth A
Page 4
ACKNOWLEDGEMENT
Srikanth A (U18GH21S0099)
Page 5
CONTENTS
Serial No. Page No
1 Executive Summary
3 Work Description
4 Learning Outcome
5 Bibliography
Annexures
Page 6
Letter of application to the employer for internship [ from college]
Questionaries
Page 7
1. Executive Summary
1.1 Purpose
An internship in Android app development serves several essential purposes for both
the intern and the company, creating a mutually beneficial relationship that fosters
growth and innovation.
For Interns:
Firstly, internships offer a fantastic opportunity for learning new skills. Interns
can significantly enhance their technical abilities by working with programming
languages such as Java or Kotlin and gaining hands-on experience with
development tools like Android Studio. This practical exposure is invaluable, as
it allows interns to move beyond theoretical knowledge and apply what they've
learned in a real-world setting. Additionally, they get to understand the entire
development process, from designing and coding to testing and maintaining apps.
This comprehensive understanding of the software development lifecycle is
crucial for anyone looking to build a career in app development.
Page 8
the dynamic nature of app development and stay updated with the latest trends
and technologies. Networking is another crucial aspect. Interns have the chance
to build professional relationships with peers, mentors, and industry experts.
These connections can be incredibly valuable for future career opportunities,
providing references, job leads, and advice from experienced professionals.
For Companies:
From the company’s perspective, internships serve as an excellent way to find and
train future employees. Internships act as an extended interview process, where
companies can evaluate potential hires over a longer period than a traditional
interview would allow. This helps ensure that interns who transition to full-time
roles are a good fit for the company’s culture and meet its performance standards.
Additionally, interns bring fresh perspectives and innovative ideas that can drive
creativity and problem-solving within the team. Their new viewpoints can lead to
innovative solutions that more experienced employees might not consider.
Interns also provide much-needed support on various projects. They can handle
tasks that increase overall productivity, allowing full-time employees to focus on
more complex or critical tasks. This additional workforce can be particularly
beneficial during peak times or when tackling large projects. Interns often take on
smaller, less critical tasks, which still contribute significantly to the project's
Page 9
success but might not require the expertise of a senior developer. This delegation
helps in maintaining the efficiency and effectiveness of the development process.
Page 10
are essential for Android development. They will also learn to use Android Studio,
the main tool for creating Android apps. Additionally, interns will become familiar
with various APIs and libraries that add functionality to apps, such as Google Maps
API, Firebase, and Retrofit.
Project management skills are also a key part of the internship. Interns will often
work within Agile frameworks like Scrum or Kanban, participating in sprints,
stand-up meetings, and retrospectives. They will use version control systems such
as Git for collaborative development and code management, which is essential for
working in a team. Creating and maintaining technical documentation is another
important skill that interns will develop, ensuring that their work is well-
documented for future reference and maintenance.
Page 11
Interns will get the chance to work on real-world projects, which is one of the most
exciting aspects of the internship. They may develop new features for existing apps
or create new apps from scratch, making valuable contributions to the company’s
products. Interns will also engage in bug fixing, identifying and resolving issues to
improve the stability and performance of applications. Incorporating user feedback
into app improvements and new features is another critical learning experience.
Developing soft skills is an integral part of the internship. Interns will improve their
communication skills through regular interactions with team members and possibly
clients, learning to present ideas clearly and effectively. Problem-solving skills will
be honed as interns tackle real-world challenges and find effective solutions. These
experiences are crucial for personal and professional development.
Page 12
grooming potential future employees, which can reduce the time and cost
associated with hiring new talent.
Professional growth is another significant outcome for interns. They gain insights
into industry standards, best practices, and emerging trends in Android app
development. Networking opportunities abound as interns connect with industry
professionals, mentors, and peers. These connections can lead to future job
Page 13
opportunities and provide valuable guidance along the way. Additionally, interns
develop essential soft skills such as communication, teamwork, and time
management, which are vital for success in any professional setting.
For companies, the outcomes of hosting an internship are equally rewarding. They
gain access to fresh talent, potentially identifying future employees who fit
seamlessly into the company culture. Interns bring new perspectives and innovative
ideas, infusing projects with creativity and energy. This influx of talent increases
overall productivity by providing valuable support on various projects, allowing
full-time employees to focus on more strategic initiatives.
Page 14
Meanwhile, companies benefit from access to fresh talent, increased productivity,
a positive brand image, and opportunities for community and industry engagement.
This symbiotic relationship underscores the value of internships in shaping the
future of both individuals and organizations in the dynamic field of app
development.
Page 15
Testing is an integral part of the development process, where developers
rigorously test the app for bugs, errors, and compatibility issues across different
devices and screen sizes. Through various testing methodologies such as unit
testing, integration testing, and user acceptance testing, developers ensure that the
app meets quality standards and delivers a seamless user experience.
Deployment marks the final stage of the development process, where developers
package the app and prepare it for distribution on the Google Play Store or other
app distribution platforms. This involves creating release builds, generating
signed APKs (Android Package files), and optimizing the app's listing for
discoverability and user engagement.
Page 16
the digital marketplace. Through collaboration, innovation, and continuous
learning, Android developers play a vital role in shaping the future of mobile
technology and delivering impactful solutions that enrich the lives of users
worldwide.
Android app development is a dynamic and rapidly evolving field within the
realm of software development, characterized by its focus on creating mobile
applications specifically for devices running the Android operating system. With
the widespread adoption of smartphones and tablets powered by Android, the
demand for innovative and user-friendly mobile applications has soared, driving
the growth of the Android app development industry. This domain offers a
diverse range of opportunities for developers to leverage their skills and
creativity to build impactful applications that cater to a global audience of
mobile users.
Page 17
development. The Android platform offers developers unparalleled flexibility
and customization options, allowing them to create highly tailored and
personalized experiences for users. From custom user interfaces and interactive
animations to seamless integration with device hardware and sensors, Android
developers have the freedom to push the boundaries of what is possible in mobile
app development.
Despite its many strengths and opportunities, Android app development also
presents its share of challenges and considerations for developers.
Fragmentation, arising from the diverse array of Android devices, versions, and
screen sizes in the market, poses challenges for developers in ensuring
compatibility and optimization across different devices. Security concerns, such
as data privacy, unauthorized access, and malware threats, are also paramount
Page 18
considerations for developers when designing and implementing Android
applications. Moreover, navigating the competitive landscape of the Google
Play Store, where millions of apps vie for users' attention and downloads,
requires developers to employ effective marketing, monetization, and user
acquisition strategies to succeed.
Page 19
Bus operators are extremely pleased with the Touring Talkies.in product.
KEY FEATURES
Page 20
• Latest technology – software based on Google's Android, the world's
most popular mobile platform.
• System plays only legal, licensed content.
Benefits to Eco-System
• Fleet Owners
➢ Differentiated fleet of buses resulting in increased occupancy
➢ Offers a compelling entertainment service for customers
leading to increased customer satisfaction
• Content owners
➢ Ability to serve legal, licensed content to a captive audience,
and reduce piracy.
➢ Streams high-quality content to passengers, using the latest
technology.
• Passengers
➢ High-quality personal entertainment on long duration
regional travel.
➢ The journey becomes enjoyable: Passengers are not disturbed
by the entertainment needs of others.
3. Work Description
3.1 Interns job role description
Job Overview:
Page 21
Key Responsibilities:
Page 22
c. Knowledge of Android UI design principles, patterns, and best
practices.
8. Tools and Technologies:
a. Experience with version control systems (e.g., Git).
b. Familiarity with Android Studio and other relevant development
tools.
9. Soft Skills:
a. Strong problem-solving abilities and analytical skills.
b. Excellent communication and teamwork skills.
c. Ability to work independently and manage time effectively.
10. Preferred Qualifications:
a. Experience with additional programming languages and
frameworks.
b. Personal or academic projects that demonstrate your coding skills
and passion for Android development.
11. Benefits:
a. Hands-on experience with real-world projects.
b. Mentorship from experienced developers.
c. Opportunity to attend tech talks and workshops.
d. Potential for full-time employment based on performance.
e. A supportive and collaborative work environment.
Page 23
Features of Java:
1. Object-Oriented:
Java is fundamentally object-oriented. Everything in Java is associated
with classes and objects, along with its attributes and methods. Java can
be easily extended since it is based on the Object model.
2. Platform Independent:
Java is platform-independent at both the source and binary levels, which
is a result of the language's ability to run on the Java Virtual Machine
(JVM). When Java code is compiled, it is converted into bytecode, which
can be run on any system that has a JVM, thus ensuring the WORA
capability.
3. Simple:
Java was designed to be easy to use and accessible to a broader audience.
It eliminates the complexities of C++ such as pointers and operator
overloading, simplifying memory management with its garbage
collection.
4. Secure:
Java provides a secure execution environment through its runtime
environment (JRE), which includes a security manager that defines
access policies and bytecode verification that ensures that code adheres
to Java's safety standards.
5. Multithreaded:
Java supports multithreading at the language level. A thread is a separate
path of execution, and Java provides built-in support for multi-threaded
programming, allowing developers to write programs that can perform
many tasks simultaneously.
6. Robust:
Java is designed to eliminate error-prone situations by emphasizing
compile-time error checking and runtime checking. The language
provides strong memory management, automatic garbage collection, and
exception handling, which contribute to its robustness.
Page 24
7. Distributed:
Java has extensive support for networking and data sharing, which makes
it ideal for developing large-scale, distributed applications. Its
networking capabilities are built into the language itself, making it easier
to build network-based applications.
Applications of Java:
1. Web Applications:
Java is widely used for building web applications. Technologies like
Servlets, JSP (JavaServer Pages), and frameworks like Spring and
Hibernate facilitate the development of robust web applications.
2. Enterprise Applications:
Java EE is used for developing large-scale enterprise applications. It
offers APIs and runtime environments for scripting, providing
transactional, secure, and scalable environments.
Page 25
3. Mobile Applications:
Java ME was originally the platform of choice for mobile applications.
With the advent of Android, Java has become even more significant in
mobile app development. Android development primarily uses Java,
making it a crucial skill for mobile developers.
4. Scientific Applications:
Java is used for scientific applications requiring high-level mathematical
calculations and secure environments, owing to its stability and
robustness.
5. Embedded Systems:
Java is utilized in embedded systems, including smart cards, sensors, and
other low-level devices due to its portability and security features.
Introduction:
History:
Before Android Studio, Android developers primarily used Eclipse with the
Android Development Tools (ADT) plugin. However, as Android applications
grew more complex, the need for a more integrated and efficient development
environment became apparent. Google responded by developing Android
Studio, which was first released in a preview version in 2013 and became stable
with version 1.0 in December 2014.
Page 26
Features of Android Studio:
Page 27
8 Version Control Integration:
Android Studio supports integration with version control systems such as
Git, GitHub, and Subversion. This integration provides a smooth workflow
for collaborative development and version management.
9 Linter:
Android Studio includes a comprehensive lint tool that checks the code for
potential errors, code smells, and other issues. It helps maintain code quality
and adherence to best practices.
10 Advanced Testing Support:
Android Studio offers robust support for testing, including unit tests,
integration tests, and UI tests. It supports frameworks like JUnit, Espresso,
and UI Automator, providing a comprehensive testing environment.
1 Canary Channel:
For developers who want the latest features and updates as soon as they are
available, even if they might not be fully stable.
2 Beta Channel:
More stable than Canary, this channel offers access to new features and
improvements before they are included in the stable release.
3 Stable Channel:
The stable channel provides the most reliable and tested version of Android
Studio. It is recommended for production development.
1 Installation:
Android Studio is available for download on Windows, macOS, and Linux.
The installation package includes the Android SDK, the Android Emulator,
and a suite of tools for development and testing.
2 Creating a New Project:
When starting a new project, Android Studio provides templates to choose
from, making it easier to start building different types of apps. The IDE
guides the developer through the setup of the project structure, including
setting up Gradle configurations.
Page 28
3 Building and Running Applications:
Developers can build their applications with a simple click of a button. The
integrated emulator allows for quick testing, or developers can connect a
physical Android device via USB for live testing.
4 Debugging:
Android Studio includes a robust debugger with the ability to set
breakpoints, inspect variables, and evaluate expressions. It supports
debugging on both virtual and physical devices.
5 Publishing Applications:
Android Studio simplifies the process of preparing an app for release. It
includes tools for signing APKs, generating ProGuard rules, and optimizing
the final APK for distribution on the Google Play Store.
Advanced Usage:
1 Jetpack Libraries:
Android Studio provides support for Jetpack libraries, a suite of libraries,
tools, and guidance to help developers write high-quality, robust, and
maintainable code. Jetpack components are designed to work well with the
Kotlin programming language and include libraries for lifecycle
management, navigation, and more.
2 Modularization:
Developers can create modular applications in Android Studio by organizing
their projects into multiple modules. This modularization helps in managing
large codebases, improving build times, and reusing code across different
projects.
3 Continuous Integration and Continuous Delivery (CI/CD):
Android Studio can be integrated with CI/CD pipelines using tools like
Jenkins, CircleCI, and GitHub Actions. This integration allows for
automated building, testing, and deployment of applications.
4. Learning Outcome
4.1 Abstract of work experience
Page 29
During my tenure as an Android Developer Intern at [Company Name], I had
the opportunity to immerse myself in the dynamic and rapidly evolving field of
mobile application development. My role involved collaborating with a team of
skilled professionals, contributing to the development and enhancement of
Android applications, and gaining hands-on experience with various
development tools and methodologies. This abstract provides a comprehensive
overview of my responsibilities, the skills I acquired, and the contributions I
made during my internship.
1 Application Development:
a. Collaborated with senior developers to design, develop, and test
new features for existing Android applications.
b. Wrote clean, efficient, and maintainable code in Java and Kotlin,
adhering to the project’s coding standards and best practices.
c. Assisted in the development of user interfaces using XML and
ensured that UI components were responsive and adhered to
design specifications.
2 Bug Fixing and Debugging:
a. Identified and resolved bugs reported by users and QA testers.
b. Used Android Studio’s debugging tools to trace and fix issues,
improving the overall stability and performance of the
applications.
c. Conducted code reviews and provided feedback to peers,
ensuring code quality and consistency across the project.
3 Performance Optimization:
a. Implemented performance enhancements by optimizing code and
using efficient algorithms.
b. Monitored application performance using Android Profiler to
identify and address memory leaks, CPU usage issues, and
network latency.
Page 30
c. Worked on reducing application load times and improving
overall user experience through various optimization techniques.
4 Feature Implementation:
a. Developed new features from scratch, following the entire
software development lifecycle from design to deployment.
b. Collaborated with the UX/UI team to ensure seamless integration
of new features and a consistent user experience.
5 Testing and Quality Assurance:
a. Conducted manual testing on different Android devices to ensure
compatibility and identify device-specific issues.
6 Version Control and Collaboration:
a. Used Git for version control, managing code repositories,
branching, and merging changes efficiently.
Skills Acquired:
1 Technical Skills:
a. Proficiency in Java programming language, with a strong
understanding of object-oriented principles.
b. Experience with Android SDK, including libraries for
networking, data storage, and UI components.
c. Knowledge of design patterns, particularly MVC and MVVM,
and their application in Android development
2 Tools and Technologies:
a. Mastery of Android Studio, including its various tools and
features for development, debugging, and testing.
b. Proficient use of Gradle for managing project dependencies and
build configurations.
3 Soft Skills:
a. Enhanced problem-solving abilities and analytical thinking,
particularly in debugging and optimizing applications.
b. Improved communication and teamwork skills through regular
interaction with team members and stakeholders.
Page 31
c. Time management and multitasking abilities, balancing multiple
tasks and meeting project deadlines.
1 Feature Development:
a. Successfully developed and integrated several key features into
the company’s flagship application, significantly enhancing its
functionality and user engagement.
b. Implemented a push notification system using Firebase Cloud
Messaging, improving user retention and interaction.
2 Performance Improvements:
a. Optimized the application’s performance, leading to a 20%
reduction in load times and a smoother user experience.
b. Identified and resolved memory leaks, resulting in improved
application stability and reduced crashes.
3 Quality Assurance:
a. Contributed to a comprehensive testing framework that increased
test coverage and reduced the number of bugs in production.
b. Assisted in the documentation of testing procedures and best
practices, facilitating knowledge transfer and onboarding of new
team members.
Page 32
4.2 Any application development/ technology learnt
Driver Connect:
• This is an android based platform for connecting drivers of a bus
operator.
• The Drivers can interconnect and communicate effectively using
this platform.
• The detailed platform will be a separate artifact.
• The drivers can inter connect, chat, share details via this platform.
Android Studio:
Android Studio is the official integrated development environment (IDE) for
Google's Android operating system, built on JetBrains' IntelliJ IDEA software
and designed specifically for Android development. It provides developers
with a comprehensive suite of tools to create, test, and debug Android
applications. Features include a rich layout editor that supports drag-and-drop
interface design, a flexible build system based on Gradle, and a robust emulator
to run and test apps on various virtual devices. Additionally, Android Studio
offers extensive code editing, debugging, and performance tools, such as real-
time profilers to monitor CPU, memory, and network activity. With its
seamless integration with Firebase, a suite of cloud-based services, and support
for Kotlin, Java, and C++, Android Studio is a powerful and versatile
environment for building high-quality Android apps efficiently.
SQLite Database:
SQLite is a lightweight, open-source, self-contained, serverless database
engine widely used for embedded applications. In the context of Android
development, SQLite serves as the primary database system for storing and
managing local data. It allows developers to create, update, and query
databases using SQL commands directly within the Android device. SQLite's
minimal setup and footprint make it an ideal choice for mobile applications
where resources and performance are critical. Android provides robust support
for SQLite through its API, which facilitates database operations via classes
such as SQLiteOpenHelper and SQLiteDatabase. These classes simplify
Page 33
database management tasks, including schema creation, version management,
and CRUD (Create, Read, Update, Delete) operations, enabling developers
to efficiently manage user data, application settings, and other persistent
information within their apps.
Shared Preferences:
Shared Preferences in Android is a lightweight mechanism to store and retrieve
key-value pairs of primitive data types such as strings, integers, and booleans.
This is particularly useful for saving small amounts of data like user settings,
preferences, or state information across application launches. Shared
Preferences are stored in XML files and are private to the application, ensuring
data security.
File IO:
File I/O (Input/Output) operations in Android are essential for reading from
and writing to files within an app. Android provides several APIs for file I/O
operations, allowing developers to store data in internal or external storage.
Internal storage is private to the app, meaning other apps cannot access these
files. External storage, on the other hand, can be accessed by other apps and
is often used for larger files or when the user needs to share files between
apps. The File class in Java, along with classes like FileInputStream,
FileOutputStream, BufferedReader, and BufferedWriter, are commonly
used for handling file operations. Proper management of file I/O operations
Page 34
includes handling permissions, ensuring data security, and managing
resources efficiently to avoid memory leaks or application crashes.
Permissions:
In Android, permissions are a crucial security feature designed to protect user
data and system resources. They govern what an app can access and perform
on a device, ensuring user privacy and security. There are several types of
permissions, including normal permissions, which cover fewer sensitive data
and are automatically granted by the system, and dangerous permissions,
which protect sensitive user information like location, contacts, and camera
access, and require explicit user approval. Starting from Android 6.0
(Marshmallow), the permission model was updated to ask for permissions at
runtime rather than at installation, allowing users to have more control over
what data they share. Furthermore, Android 11 introduced one-time
permissions, granting temporary access to sensitive data. Developers must
declare all necessary permissions in the app's manifest file, and adhere to best
practices to ensure they request only the permissions they need, respecting
user trust and device security.
Page 35
cases where the user denies permissions or cancels the image selection
process ensures robustness in your app's functionality.
AndroidManifest.xml:
General Structure:
The manifest file starts with an XML declaration and the root <manifest>
element, which includes namespace declarations for Android and tools
attributes. The manifest encompasses several crucial components: features,
permissions, application details, activities, and metadata.
Page 36
Uses-Feature:
The <uses-feature> elements declare the hardware and software features the
app can utilize. In this case, the app can access the device's camera and
telephony features, but neither is required (android:required="false"). This
means the app can function on devices without these features, potentially
modifying behavior based on availability.
Permissions:
Application Element
Page 37
➢ android:theme="@style/Base.Theme.MyApplication" defines the
app’s base theme.
➢ tools:targetApi="31" indicates compatibility considerations for a
specific API level.
Activities
Meta-Data
This manifest file outlines the essential setup for the "Driver Connect" Android
application. It specifies the app's dependencies on device features, required
permissions for accessing specific functionalities, and the main structure of the
app’s activities. The redundancy in permission declarations should be
addressed to avoid potential issues. The use of meta-data for preloaded fonts
and detailed backup rules indicates an emphasis on user experience and data
management. Overall, the manifest is a blueprint guiding the Android system
Page 38
on how to deploy, manage, and interact with the app, ensuring it functions
correctly within the broader ecosystem.
Splash.java:
The splash activity serves as the initial screen that appears when the application
is launched. It provides a seamless transition to either the login page or the
details page based on the user's login status. Here's a breakdown of its
functionality:
Layout Setup: In the onCreate() method, the activity layout is set using
setContentView(R.layout.activity_splash). Additionally,
EdgeToEdge.enable(this) ensures edge-to-edge content display, enhancing the
visual experience.
Page 39
Overall, the splash activity efficiently manages the transition between different
parts of the application based on the user's login status, providing a smooth and
intuitive user experience from the moment the app is launched.
activity_splash.xml:
The XML layout file defines the user interface for the Splash Activity in Driver
Connect application features a centralized ImageView displaying a drawable
resource and a TextView beneath it, displaying the text "by Jumpstart
Technologies." The ImageView has fixed dimensions with specific margins,
ensuring it remains proportionally placed within the screen. The text below,
styled with a custom font and red color, provides a subtle branding touch.
Constraints are used to align both elements relative to the parent layout,
ensuring they stay centered horizontally while maintaining specific vertical
biases for a balanced look. This splash screen, designed using
ConstraintLayout, ensures a visually appealing and consistent user experience
across various device sizes.
Login_page.java:
The Login_Page class in this Driver Connect application is a comprehensive
implementation of a user authentication interface. This activity, extending
AppCompatActivity, is designed to facilitate user login with robust validation
and feedback mechanisms. When the activity is created, it sets the layout,
initializes UI components, and sets up shared preferences for persistent storage
of user login status. The primary components include EditText fields for
capturing the username and password, a Button for initiating the login process,
and a TextView that navigates users to the sign-up page.
The login button's OnClickListener captures and trims user inputs, then
invokes the isAllFieldChecked() method to validate the entries. The validation
process ensures the username adheres to a specific pattern (a valid phone
number starting with digits 6-9) and that the password meets a minimum length
requirement. If the inputs pass these checks, the app verifies the credentials
using a helper class DriverConnectDatabaseHelper. Successful verification
Page 40
redirects the user to the Details_Page, while unsuccessful attempts trigger an
alert with a relevant message.
Additionally, the activity overrides the default back button behavior to prevent
accidental exits. A double-back press within three seconds prompts an exit
confirmation dialog, providing a more user-friendly experience. This dialog is
created using AlertDialog.Builder and ensures the user’s intent to leave the
application is clear. Shared preferences are used to store and retrieve the user's
phone number and login status, enhancing the persistence and reliability of the
login session across app restarts.
Login_status.java:
The Login_status class in this Driver Connect application is a simple yet
essential component designed to encapsulate the results of a login attempt,
providing a clear and structured way to convey both the status and message
associated with the login process. This class contains two primary fields:
Login_message, a String that holds any messages related to the login attempt
(such as success or error messages), and Login_status, a Boolean that indicates
whether the login was successful or not.
The class provides standard getter and setter methods for both fields. The
getLogin_message() method returns the current login message, while the
setLogin_message(String login_message) method allows the setting of a new
message. Similarly, the getLogin_status() method returns the current login
status, and the setLogin_status(Boolean login_status) method allows updating
Page 41
the login status. These methods follow the JavaBeans naming convention,
making the class compatible with various frameworks and tools that rely on
this convention.
The Login_status class plays a pivotal role in the login workflow, especially in
the interaction between the user interface and the underlying authentication
logic. When a login attempt is made, the authentication mechanism (typically
encapsulated in a helper class such as DriverConnectDatabaseHelper) returns
an instance of Login_status. This instance contains the outcome of the login
attempt, which the UI layer can then use to provide feedback to the user. For
example, if the login is successful, Login_status would have Login_status set
to true and a corresponding success message in Login_message. Conversely,
if the login fails due to incorrect credentials or other issues, Login_status would
be false, and Login_message would contain an appropriate error message.
By encapsulating the login result in a dedicated class, the code achieves a clear
separation of concerns, where the login logic is distinct from the user interface
logic. This design enhances the maintainability and readability of the code,
making it easier to manage and extend. For instance, additional fields or
methods could be added to Login_status without impacting other parts of the
application, allowing for more detailed status reporting or additional
functionality in the future.
Moreover, the simplicity of the Login_status class makes it highly reusable and
testable. It can be easily instantiated and manipulated in unit tests, enabling
thorough testing of the login-related logic in isolation from the rest of the
application. This approach ensures that any changes or additions to the login
process can be rigorously validated before being integrated into the main
application, thereby reducing the likelihood of bugs or regressions.
Page 42
ensuring a secure and user-friendly login experience. This class not only
simplifies the communication of login outcomes but also supports the broader
architectural principles of modularity and separation of concerns, contributing
to the overall quality and reliability of the application.
Login_page.xml:
The XML layout file defines the user interface for the Login page in Driver
Connect application, utilizing a ScrollView to ensure all elements are
accessible even on smaller screens. The ScrollView contains a LinearLayout
that organizes the child views vertically, centering them within the parent
container. This layout begins with an ImageView that displays an image,
presumably a logo, followed by a TextView for the app's name, styled with
custom fonts and colors to enhance visual appeal. Below this, another
TextView labels the page as "Login Page," using a distinct font and color for
emphasis.
Further down, two pairs of TextView and EditText elements capture the user's
phone number and password. The phone number EditText is restricted to
numerical input with a maximum length of 10 digits, reflecting a typical mobile
number format. Both input fields are styled with custom fonts, hint texts, and
background tints to align with the app's design aesthetic.
The Button labeled "Login" spans the full width of the screen, providing a
large, easily tappable target for users. It is styled with a specific background
color and text attributes to make it visually distinct. The button’s placement
ensures it is easily accessible after the user has filled in the input fields.
Page 43
Overall, the layout is designed with accessibility and user experience in mind.
The use of custom fonts, consistent padding, and clear labels helps create a
cohesive and professional appearance. The ScrollView ensures that the layout
remains functional on devices with varying screen sizes, while the centralized
arrangement of elements makes it easy for users to navigate and interact with
the app. This thoughtful design not only enhances usability but also reinforces
the application's brand identity through its visual elements.
Sign_up Page:
Signup_Page, is an Android activity in Driver Connect application that
facilitates user registration within a mobile application. This activity includes
fields for entering a bus number, phone number, driver’s name, location,
password, and password confirmation. It also supports user profile image setup
through either image capture using the device's camera or image selection from
the gallery. When the activity starts, various UI elements such as EditText
fields for text input, a TextView for login navigation, Button elements for form
submission and profile image setup, and an ImageView to display the chosen
profile image are initialized.
The onCreate method sets up the UI, assigns click listeners to the relevant
buttons, and handles navigation to the login page if the login TextView is
clicked. The submit button’s click listener validates the input fields using the
utility method isAllFieldsChecked, ensuring all necessary fields are filled out
correctly. If validation passes, the method readFile checks if the phone number
already exists in the database. If the phone number is found, an alert dialog
informs the user that the account already exists and offers to navigate to the
login page. If the phone number is not found, the user’s details, along with an
encoded password and profile image path, are saved to the database using
DriverConnectDatabaseHelper.
The profile button’s click listener provides options to upload a profile image
from the gallery or capture a new image using the device's camera. Upon
selecting an image source, the appropriate intent is launched. The
onActivityResult method handles the result of these intents, decoding the
Page 44
selected or captured image into a bitmap, and saving the image to a file using
a utility method. This image path is then stored for later use when saving the
user's details to the database.
Signup_page.xml:
The XML layout file defines the user interface for the Signup page in Driver
Connect application, designed with a vertical scroll view to accommodate
multiple input fields and elements in a visually organized manner. The parent
ScrollView ensures that all elements are accessible even on smaller screens by
allowing vertical scrolling. Inside the ScrollView, a LinearLayout with a
vertical orientation serves as the main container for the various UI components,
ensuring that they are displayed in a single column. The layout starts with a
nested LinearLayout to center the app’s logo and the text labels "Driver
Connect" and "Sign-up Page", providing a welcoming introduction at the top
of the screen.
Page 45
device's camera. The image is displayed within a rounded CardView for a clean
and modern look.
Subsequent sections of the layout include labeled TextView and EditText pairs
for input fields essential for registration: Bus Number, Phone Number, Driver
Name, Place, Password, and Password Confirmation. Each input field is styled
with consistent margins, background tints, and fonts to maintain a uniform and
aesthetically pleasing design. The EditText elements have specific input types
set to ensure appropriate keyboard layouts and input constraints, such as
number input for the phone number and password fields for secure entry.
The layout utilizes modern design principles with material design components
and custom fonts, providing a clean and user-friendly interface. The thoughtful
arrangement of elements ensures an intuitive user experience, guiding users
through the registration process smoothly. The design is responsive and
accessible, accommodating various screen sizes and orientations while
maintaining the overall aesthetic and functionality. This layout effectively
combines visual appeal with practical functionality, ensuring that users can
easily navigate and complete the signup process within the application.
Details_Page.java:
The Details_Page class represents an activity in an Android application
designed for managing user details and providing navigation options. This
activity includes several key components to create a comprehensive user
interface and functionality. The class begins by defining essential member
variables such as DrawerLayout, ActionBarDrawerToggle, Toolbar, Button,
and RecyclerView, which are used to manage the navigation drawer, toolbar,
logout button, and a list of details, respectively. It also includes
Page 46
SharedPreferences to handle user session data and several ArrayList objects to
store information such as bus numbers, phone numbers, driver names, places,
and passwords.
In the onCreate method, the activity's layout is set using setContentView, and
various UI elements are initialized using findViewById. The navigation
drawer is set up with a Toolbar and an ActionBarDrawerToggle, which
synchronizes the state of the drawer and the toolbar. The NavigationView is
configured to respond to menu item selections, providing functionality for the
logout button and navigation to the profile page. The method also initializes
the DriverConnectDatabaseHelper to interact with the database and retrieve
stored data.
The displayData method is critical, fetching data from the database using a
Cursor object. It reads the stored details and populates the respective ArrayList
objects. Additionally, it sets the driver name, phone number, and profile image
in the navigation drawer header if the user's phone number matches the stored
data. This method uses a utility class Util to load a profile image from a file
path stored in the database, converting it to a Bitmap and displaying it in an
ImageView.
The alert method handles the logout process, displaying a confirmation dialog.
If the user confirms, the SharedPreferences are updated to reflect the logout
status, and the user is redirected to the Login_Page activity. A toast message is
shown to indicate successful logout. The onOptionsItemSelected method
ensures the drawer toggle state is correctly handled.
Page 47
Overall, the Details_Page class integrates navigation, data display, user session
management, and interaction handling within a cohesive framework. The
activity's layout is designed to be intuitive, featuring a navigation drawer for
easy access to different sections and a recycler view to display user details in
a structured manner. The use of shared preferences and database interactions
ensures that user data is persistently managed, providing a seamless and
personalized user experience. The implementation of alert dialogs for logout
and exit actions demonstrates attention to user flow and engagement,
enhancing the overall usability of the application.
Details_Page.xml:
The XML layout file defines the user interface for the Details_Page activity in
Driver Connect application. This activity features a DrawerLayout as the root
layout, which is a common choice for implementing navigation drawers that
can be swiped in from the edge of the screen. The DrawerLayout contains two
main child components: a LinearLayout for the main content area and a
NavigationView for the navigation drawer.
The LinearLayout serves as the main content area, configured to match the
parent dimensions and has a vertical orientation. It is styled with a moonstone
grey background to maintain a consistent aesthetic. Within this LinearLayout,
a RelativeLayout is used to create a header section with a specific height of
170dp. This header contains an AppCompatToolbar aligned to the left, an
ImageView centered horizontally and aligned to the right, and a TextView
centered horizontally at the bottom of the image. The toolbar provides an
elevated surface for UI actions, while the image and text elements help brand
the screen with a recognizable icon and title, "Driver Connect," styled using a
custom font and a large text size.
Page 48
The RecyclerView is set to wrap its content height, allowing it to adjust
dynamically based on the number of items displayed.
The Details_Page class, which uses this layout, would manage the interactions
and data binding for these UI elements. The toolbar would facilitate opening
and closing the navigation drawer, while the RecyclerView would display
dynamic content such as a list of bus details, retrieved from a local database or
an API. The navigation drawer allows users to switch between different
sections of the application seamlessly, enhancing the overall user experience.
Adapter.java:
It is a custom Adapter class for a RecyclerView in Driver Connect application.
This Adapter class is responsible for creating and binding view holders, which
Page 49
in turn are used to display individual items within the RecyclerView. This
approach enables efficient and scalable rendering of lists or grids of data, as
only the visible items need to be instantiated and managed at any given time.
ViewHolder Class
Inside the Adapter class, there is an inner class named ViewHolder that extends
RecyclerView.ViewHolder. The ViewHolder class holds references to the
views that will display the data for each item. Specifically, it contains
TextView variables for bus number, phone number, driver name, and place.
These views are initialized in the ViewHolder constructor by finding them
within the itemView, which represents the layout of each individual item in the
list.
onCreateViewHolder Method
The onCreateViewHolder method is responsible for creating new view
holders. It inflates a layout resource named listofcards, which represents the
layout of each item in the RecyclerView. This layout is then used to create a
new ViewHolder instance, which is returned to the RecyclerView. The inflated
layout is passed to the ViewHolder constructor, ensuring that the view holder
has references to the appropriate views.
onBindViewHolder Method
The onBindViewHolder method binds data to the view holder. This method is
called by the RecyclerView to display the data at the specified position. It takes
in a ViewHolder instance and an integer position as parameters. Within this
Page 50
method, the adapter retrieves data from the corresponding position in the lists
and sets the text of the TextView elements in the view holder. This ensures that
each item in the RecyclerView displays the correct information.
getItemCount Method
The getItemCount method returns the total number of items in the data set,
which corresponds to the size of the phone_no list. This method allows the
RecyclerView to know how many items it needs to display.
The provided layout resource listofcards is likely a custom XML layout file
that defines the structure of each item in the RecyclerView. This layout file
would include TextView elements for displaying the bus number, phone
number, driver name, and place. The use of RecyclerView and custom adapters
is a standard approach in modern Android development, allowing for highly
customizable and efficient list and grid displays.
When integrated with the broader application, this Adapter class contributes to
a seamless user experience by providing a responsive and dynamic list view.
The RecyclerView can handle data updates efficiently, reflecting changes in
Page 51
the underlying data set without requiring a complete re-render of the entire list.
This capability is particularly useful in applications where data can change
frequently, such as in transportation management systems where schedules and
driver assignments might be updated regularly.
Conclusion
In conclusion, the Adapter class is a critical component in the RecyclerView
framework, enabling efficient and flexible data display in Android
applications. Its design and implementation in this code snippet illustrate key
concepts in modern Android UI development, such as view recycling, efficient
data binding, and the use of custom layouts to achieve a polished and user-
friendly interface. This approach not only enhances the user experience but
also ensures that the application performs well even with large and dynamic
data sets.
DriverConnectDatabaseHelper.java:
The DriverConnectDatabaseHelper class is a critical component of an Android
application designed to manage and interact with SQLite database. This class
extends SQLiteOpenHelper, which provides a robust framework for managing
database creation and version management. The Driver Connect Database
Helper class is specifically tailored for storing and retrieving driver-related
data, encapsulating the essential operations needed to handle driver
information efficiently.
The onCreate method is overridden to create the database schema when the
database is first created. It executes a SQL statement to create the Driver_Data
Page 52
table with the defined columns. The COLUMN_PHONE is set as the primary
key, ensuring that each entry in the table is unique and identifiable by the phone
number.
Adding Data
The addDriver method allows the insertion of new driver records into the
database. This method accepts parameters for all the columns in the
Driver_Data table. It uses the ContentValues class to map the column names
to their corresponding values. The SQLiteDatabase instance is obtained in
writable mode to perform the insert operation. If the insertion is successful, a
confirmation toast message is displayed to the user; otherwise, an error
message is shown.
Reading Data
The readData method retrieves all records from the Driver_Data table. It
constructs a SQL query to select all columns from the table and executes it
using the rawQuery method of the SQLiteDatabase class. The method returns
a Cursor object that contains the result set. This cursor can be used to iterate
over the results and extract the required data.
Updating Data
The updateUserData method updates an existing driver record identified by the
phone number. This method also uses ContentValues to specify the new values
for the columns. The update method of the SQLiteDatabase class performs the
update operation. Similar to the insertion method, a toast message is displayed
based on the success or failure of the operation.
Deleting Data
The deleteUserData method deletes a driver record based on the provided
phone number. It uses the delete method of the SQLiteDatabase class to
perform the deletion. As with other operations, the method displays a toast
message indicating whether the deletion was successful.
Page 53
The verifyUser method is designed to authenticate users based on their phone
number and password. It queries the Driver_Data table to fetch the phone
number and password for each record. The method uses the Cursor object to
iterate through the results and compare the provided credentials with the stored
values. If a match is found, the method sets the login status to true. It also uses
a utility method, decodePassword, to decode the stored password before
comparison. This ensures that the passwords are securely stored and handled.
Utility Integration
The class integrates a utility class, Util, which provides additional functionality
such as password decoding. This integration exemplifies the use of helper
classes to maintain code modularity and reusability.
The class ensures data integrity and security through structured database
operations and secure handling of passwords. By abstracting the database
operations within this helper class, the application code remains clean and
focused on business logic, while the helper class manages all interactions with
the SQLite database.
Page 54
Conclusion
The DriverConnectDatabaseHelper class exemplifies the use of SQLite in
Android applications to manage structured data efficiently. It encapsulates all
necessary database operations, providing a clean and modular interface for
other parts of the application to interact with the database. This design
enhances maintainability, security, and performance, making it a robust
solution for managing driver-related data in an Android application.
CardDesign.xml:
The XML layout file defines the user interface for the CardDesign activity in
Driver Connect application describes a custom card layout using Android's
ConstraintLayout and CardView components. This layout is likely used within
a RecyclerView to display detailed information about drivers, including bus
numbers, phone numbers, names, and places. The design emphasizes a clean,
structured, and visually appealing presentation of data, with each item
encapsulated in a card.
CardView
The CardView element, styled with a margin of 10dp, a corner radius of 40dp,
and an elevation of 40dp, creates a polished and elevated card effect. The
background color is set to a soft purple, adding a gentle, appealing hue to the
cards. Within the CardView, a vertical LinearLayout is used to arrange the
content in a vertical stack, ensuring that each piece of information is clearly
separated and easy to read.
Page 55
LinearLayouts for Content
Inside the vertical LinearLayout, four horizontal LinearLayout elements are
nested. Each of these horizontal LinearLayouts contains an ImageView and a
TextView, aligned horizontally to display an icon alongside the corresponding
text.
First LinearLayout:
• An ImageView with the ID imageView5 displays a bus icon
(baseline_directions_bus_filled_24).
• A TextView with the ID bus_menu displays the bus number, with a
margin of 10dp around it and the text color set to black.
Second LinearLayout:
• An ImageView with the ID imageView6 shows a phone icon
(baseline_contact_phone_24).
• A TextView with the ID phone_menu shows the phone number,
similarly styled with margins and text color.
Third LinearLayout:
• An ImageView with the ID imageView7 displays a person icon
(baseline_person_4_24).
• A TextView with the ID name_menu shows the driver's name.
Fourth LinearLayout:
• An ImageView with the ID imageView8 shows a place icon
(baseline_place_24).
• A TextView with the ID place_menu displays the place associated with
the driver.
Page 56
(@color/cblack), ensuring readability against the card's background color. The
margins and weights are carefully set to ensure a balanced layout, with each
icon and text pair being evenly spaced and aligned.
Practical Application
This layout is ideal for use in an application that manages transportation
logistics, such as a bus fleet management system. Each card can represent a
bus and its driver, showing crucial information at a glance. When integrated
into a RecyclerView, this layout allows for efficient and visually appealing
display of a list of drivers or buses, enhancing user experience with clear,
accessible information.
The design of this layout ensures that the information is both functional and
aesthetically pleasing. The use of CardView provides a modern look with depth
and separation, while the ConstraintLayout at the root ensures that the overall
structure is flexible and adaptable to different screen sizes and orientations.
Conclusion
The described layout combines the versatility of ConstraintLayout with the
elegance of CardView to present driver information in a clear, organized, and
visually appealing manner. By leveraging nested LinearLayout elements, it
ensures that each piece of information is distinct and easy to read. This
structure is highly suitable for applications requiring detailed, card-based
presentation of data, particularly in contexts like transportation management.
NavigationHeader.xml:
The provided XML layout defines a vertical LinearLayout that serves as a user
profile or navigation header section. This layout combines an image,
presumably of the user or driver, with textual information about the driver and
the company. The design elements are styled for a polished and cohesive user
interface, suitable for use in a navigation drawer or profile section of an app.
Page 57
The root LinearLayout is oriented vertically and spans the full width and height
of the parent. It includes padding of 10dp for spacing and uses the soft purple
background color, creating a visually appealing and consistent theme
throughout the layout. The layout also specifies a theme without an action bar,
providing a clean and unobstructed design.
Horizontal LinearLayout:
Positioned with a top margin of 20dp, this LinearLayout is set to wrap its
content, ensuring it only takes as much space as needed. The layout gravity is
set to left, aligning the content to the left side.
The background color and padding match the parent, ensuring visual
consistency.
Textual Information
Beneath the profile picture section, the layout includes two TextView elements
displaying the driver’s name and the phone number.
Page 58
Driver's Name (navdrivername):
This TextView displays the driver's name, referenced by the string resource
driver_connect.
The text color is set to white, ensuring high contrast and readability against the
soft purple background. The text size is set to 20sp, making it prominent and
easily readable.
Conclusion
This XML layout provides a simple yet effective design for displaying user
profile information within an app. Its combination of a rounded profile picture
Page 59
and clear textual information, styled with a cohesive color scheme and
appropriate spacing, ensures a user-friendly and visually appealing interface.
This layout enhances the personalization and usability of the app, making it a
valuable component for any user-centric mobile application.
Menu.xml:
This XML menu file defines a menu resource for use in an Android application.
It consists of two menu items, each represented by an <item> element. These
items are typically used in conjunction with a toolbar or an options menu to
provide user interaction options within the app.
Both menu items serve as actionable elements within the app's user interface,
providing functionality for accessing the user's profile and logging out. The
use of icons enhances the visual appeal and usability of the menu, making it
intuitive for users to understand and interact with. Additionally, streamlining
the development process and ensuring efficient resource management. Overall,
this menu resource enhances the app's usability and provides essential user
interaction options.
My_Profile.java:
Page 60
This activity allows users to view and update their profile information,
including their bus number, phone number, name, place, and password.
Additionally, users can upload or capture a profile photo.
Upon launching the activity, the user's existing profile data is fetched from a
local SQLite database using the DriverConnectDatabaseHelper class. The
fetched data is then displayed in corresponding EditText fields. Users can edit
the information and click the "Update" button to save the changes. The profile
photo can be uploaded from the gallery or captured using the device's camera.
The activity also includes functionality to delete the user's account, triggered
by clicking the "Delete Account" button. A confirmation dialog is displayed
before proceeding with the deletion. Furthermore, the app requests necessary
permissions for accessing the camera and storage to enable photo capture and
upload functionality.
My_Profile activity:
Fetching User Data: The displayUserData() method queries the local SQLite
database (DriverConnectDatabaseHelper) to retrieve the user's profile
information based on their phone number. This data is then displayed in the
corresponding EditText fields for the user to view and edit.
Update Profile:
Page 61
Users can modify their profile information and click the "Update" button to
save the changes. The updateUserData() method in Driver Connect Database
Helper is called to update the user's data in the database. Before updating, the
activity performs validation checks on the input fields to ensure they are not
empty and meet any specified criteria.
Delete Account:
Clicking the "Delete Account" button triggers a confirmation dialog asking the
user if they are sure they want to delete their account. If confirmed, the
deleteUserData() method in DriverConnectDatabaseHelper is called to delete
the user's data from the database. Additionally, the SharedPreferences data
associated with the user's login status is cleared, and the user is redirected to
the login page (Login_Page).
Permission Handling:
The activity requests necessary permissions for accessing the camera and
storage when the user opts to capture a photo. This ensures that the app has the
required permissions to perform the intended actions without encountering
security issues.
Utilities:
The activity utilizes utility methods from the Util class for tasks such as
encoding and decoding passwords, saving and loading images from files, and
performing validation checks on user input fields.
Page 62
such as data retrieval from a local database, input validation, photo handling,
permission management, and account deletion functionality. It ensures a
smooth and secure user experience while adhering to best practices in Android
app development.
Util.java:
The Util class in the Driver Connect application serves as a utility class,
providing various functionalities and methods used across different parts of the
app. Here's a breakdown of its key features:
Input Validation:
The class provides methods for validating inputs such as bus numbers and
phone numbers using regular expressions. It checks if the inputs adhere to
specific patterns and displays appropriate error messages if validation fails.
Field Validation:
Page 63
The isAllFieldsChecked() method checks if all required fields are filled out and
if the entered data meets certain criteria, such as password length and matching
password confirmation.
Image Handling:
Methods for loading images from files and saving images to files are provided.
These are crucial for managing user profile images, allowing users to upload
and display profile pictures efficiently.
VariableHolder.java:
Page 64
Password-related Messages:
Constants such as Image_dir and Extension are used for managing file
directories and file extensions, particularly in image-related functionalities like
uploading and setting profile pictures.
Strings like Warning, alert, and confirm_logout are utilized in alert dialogs,
prompting users with important messages, warnings, and confirmation dialogs
for actions like logout.
Database Operations:
Page 65
Constants like Inavlid_password, phone_not_exixts, and UserDatanotfound
are used for handling user authentication processes, providing feedback on
invalid passwords, non-existent phone numbers, and missing user data.
Splash Screen
Page 66
Login Page
Sign up Page
Page 67
Details Page
Navigation Drawer
My Profile
Page 68
Details Page After Updation
Page 69
5. Bibliography
The sources referred for this project are various websites namely GeeksforGeeks,
Android Developers, Stack Overflow, Javatpoint, Github, TutorialsPoint,
LinkedIn and “ChatGPT” for understanding the error.
Page 70
Letter of application to the employer for internship [ from college]
Page 71
Letter of Acceptance by Employer [internship confirmation letter by
Employer]
Page 72
Log Sheet Provided by the Company
Page 73
Page 74