2024
NIIT PROJECT
Documentation
COURSE: ANDROID APP
BY: AKINMULERO PRIESTLY
PROJECT TOPIC: CREATING A SOCIAL MEDIA APPLICATION
Note: THIS PROJECT WAS GIVING BY OUR SUPERVISOR MR TEGA
Project Outline for BDChat
1. Project Overview
Project Name: BDChat
Description: An Android application that integrates Firebase for user
authentication and database management, featuring user sign-up,
sign-in, and menu-based navigation.
2. Project Structure
a. Modules
MainActivity: The main activity of the application.
SignInActivity: The activity handling user sign-in.
SignUpActivity: The activity handling user sign-up.
b. Resources
Layout Files: activity_main.xml, activity_sign_in.xml,
activity_sign_up.xml
Menu File: menu.xml
String Resources: strings.xml
3. Dependencies
AndroidX Libraries
Firebase Authentication
Firebase Realtime Database
Google Play Services Auth
4. Configuration
a. Gradle Build File (build.gradle (app))
Plugins
Android Configuration
Dependencies
5. Activity Implementation
a. MainActivity.java
Setup Firebase Authentication
Inflate Activity Layout
Implement Menu Options (Settings, Group Chat, Logout)
b. SignInActivity.java
Setup Firebase Authentication
Implement Google Sign-In using Firebase
c. SignUpActivity.java
Setup Firebase Authentication
Implement User Sign-Up functionality
6. Resource Files
a. Layout Files
activity_main.xml: Layout for MainActivity
activity_sign_in.xml: Layout for SignInActivity
activity_sign_up.xml: Layout for SignUpActivity
b. Menu File
menu.xml: Defines menu options for MainActivity
c. String Resources
strings.xml: Contains string resources including Firebase Web Client ID
7. Firebase Configuration
Enable Firebase Authentication
Configure Firebase Realtime Database
Obtain and set Firebase Web Client ID in strings.xml
8. User Interface
Design UI for MainActivity, SignInActivity, and SignUpActivity
Implement Navigation
Project Outline for BDChat
1. Project Overview
BDChat is an Android application designed to provide a smooth and secure
chatting experience. The app uses Firebase for user authentication and
database management. Key functionalities include user sign-up, sign-in,
group chat creation, sending and receiving messages, updating profile
information, and navigating through various settings.
2. Project Structure
a. Modules
MainActivity: The main interface users see after logging in. It provides
navigation to other parts of the app like settings, group chat, and
logout.
SignInActivity: Handles the user sign-in process, allowing users to log
into their accounts.
SignUpActivity: Manages the user sign-up process, enabling new users
to create an account.
b. Resources
Layout Files: These XML files define the user interface for different
activities.
o activity_main.xml: The layout for the main activity.
o activity_sign_in.xml: The layout for the sign-in activity.
o activity_sign_up.xml: The layout for the sign-up activity.
Menu File: Contains the options for the navigation menu.
o menu.xml: Defines the menu items for navigation within the
MainActivity.
String Resources: Centralized location for all string values used in the
app.
o strings.xml: Includes all the string resources such as text labels
and Firebase Web Client ID.
3. Dependencies
AndroidX Libraries: For backward compatibility and enhanced
functionality.
Firebase Authentication: For managing user authentication.
Firebase Realtime Database: For real-time data management.
Google Play Services Auth: To facilitate Google sign-in functionality.
4. Configuration
The build.gradle (app) file includes plugins for Android application, Kotlin
support, and Google services. It also specifies the SDK versions,
dependencies, and other configurations necessary for the project.
5. Activity Implementation
a. MainActivity
The MainActivity is the central hub of the application. After logging in, users
can access this activity to navigate to different parts of the app. Key
functions implemented here include:
Menu Options: Settings, Group Chat, and Logout.
o Settings: Opens a settings menu for adjusting app preferences.
o Group Chat: Allows users to start or join group chats.
o Logout: Signs the user out of the app and redirects to the
SignInActivity.
b. SignInActivity
The SignInActivity manages the user sign-in process. Users can log into their
accounts using their email and password. Additionally, Google sign-in
functionality is integrated using Firebase. Key functions include:
Email and Password Sign-In: Allows users to sign in using their email
and password.
Google Sign-In: Facilitates signing in with a Google account.
c. SignUpActivity
The SignUpActivity handles new user registration. Users can create a new
account using their email and password. Key functions include:
Email and Password Sign-Up: Enables new users to sign up for an
account.
6. Additional Features
a. Messaging Function
The app includes functionality for sending and receiving messages within
group chats. This involves:
Sending Messages: Users can send text messages to group chats.
Receiving Messages: Users receive real-time updates of messages sent
in the group chat.
b. Create Group Chat
Users can create new group chats to communicate with multiple users. This
involves:
Group Creation: Users can create a new group and invite other users
to join.
Group Management: Users can manage group settings, including
adding or removing members.
c. Profile Update
Users can update their profile information, such as their display name and
profile picture.
7. Error Handling
Throughout the development process, several errors were encountered and
resolved:
Constant Expression Required: Errors in MainActivity.java related to
using resource IDs in switch-case statements. This was resolved by
converting resource IDs to integer constants.
Firebase Sign-In Errors: Errors in SignInActivity.java related to Google
sign-in configuration. Ensuring correct client ID and proper
configuration resolved these issues.
Deprecated Methods: Issues related to deprecated methods in the
code, which were resolved by updating to recommended alternatives.
8. User Interface
The user interface is designed to be intuitive and user-friendly. Key elements
include:
MainActivity: Provides navigation options and displays group chats.
SignInActivity: Offers a simple interface for user sign-in.
SignUpActivity: Provides an easy-to-follow form for new user
registration.
This project outline provides a comprehensive overview of BDChat, detailing
its structure, dependencies, configuration, key functionalities, and error
handling. This should serve as a guide for understanding the project's design
and implementation.
Conclusion
The BDChat project is a comprehensive and functional Android application
aimed at providing users with a seamless and secure chat experience. By
integrating Firebase for authentication and database management, the app
ensures real-time data synchronization and robust user management. The
project's structure, which includes key activities such as MainActivity,
SignInActivity, and SignUpActivity, facilitates a clear and organized flow of
user interactions.
Throughout the development process, careful attention was given to
implementing essential features like user sign-up, sign-in, group chat
creation, message exchange, profile updates, and navigation through
settings. Each feature was meticulously coded to ensure functionality and
user-friendliness. Despite encountering various challenges, such as issues
with constant expressions, Firebase sign-in errors, and deprecated methods,
these were effectively resolved through diligent troubleshooting and
updates to the latest recommended practices.
The user interface was designed to be intuitive, providing a smooth
navigation experience and ensuring that users can easily access the app's
features. The thoughtful integration of menu options and clear layout files
further enhances the user experience.
Overall, BDChat stands as a testament to effective project planning and
execution, demonstrating the importance of a well-structured approach to
app development. The application not only meets the intended goals but
also sets a solid foundation for future enhancements and scalability.
Pictures Of Project
Database Made with Firebase
Sign In Page Sign Up Page