ANDROID CHAT APPLICATION BASED ON USER HOBBY USING JAVA A PROJECT REPORT Submitted by PRATHEEKS V (710719205035) RAMPRADEEP K (710719205040) YUVARAJA M (710719205059) BACHELOR OF TECHNOLOGY IN INFORMATION TECHNOLOGY Dr. N.G.P. INSTITUTE OF TECHNOLOGY, COIMBATORE – 641048 ANNA UNIVERSITY: CHENNAI 600 025 JUNE 2022 ANNA UNIVERSITY: CHENNAI 600 025 BONAFIDE CERTIFICATE Certified that this project report “ANDROID CHAT APPLICATION BASED ON USER HOBBY USING JAVA” is the bonafide work of “PRATHEEKS V (710719205035), RAMPRADEEP K (710719205040), YUVARAJA M (710719205059)” who carried out the project work under my supervision. SIGNATURE SIGNATURE Dr.M. KRISHNAMOORTHI M.E., Ph.D., Dr. D. PAVITHRA M.E., Ph.D., HEAD OF THE DEPARTMENT SUPERVISOR Professor & Head Assistant Professor Department of Information Technology, Department of Information Technology, Dr. N. G. P Institute of Technology, Dr. N.G.P Institute of Technology, Kalapatti Road, Kalapatti Road, Coimbatore-641 048. Coimbatore-641 048. Submitted for the University Project Viva-Voce held on ____________ _____________ INTERNAL EXAMINER EXTERNAL EXAMINE ACKNOWLEDGEMENT We extend our heartiest thanks to Dr. NALLA G. PALANISWAMI, Chairman, KMCH & Dr. N.G.P. Educational Institutions for providing us the necessary infrastructure to do our project work. We express our gratitude to Dr. THAVAMANI D. PALANISWAMI, Secretary, Dr. N.G.P. Institute of Technology, for providing us the facilities to do our project work. We would like to express our hearty thanks and gratitude to Dr.S.U. PRABHA M.E., Ph.D., Principal, Dr. N.G.P. Institute of Technology, for her earnest encouragement. We extend our deep sense of gratitude to Dr.M. KRISHNAMOORTHI M.E., Ph.D., Head of the Department, Department of Information Technology, for his valuable guidance and constructive suggestion at all stages of our project from inception to completion. We express our hearty thanks to our project guide, Dr.D. PAVITHRA M.E., Ph.D., Assistant Professor, Department of Information Technology, for her valuable guidance and timely help for completing our project. We express our sincere thanks to our project coordinator Mrs. BIJI ROSE M.E., Assistant professor, Department of Information Technology, for her support in developing our project. We would also like to express our gratitude to the faculty members of Department of Information Technology and also to our family for their kind patronage. ABSTRACT The Mobile devices have a huge impact on human life in this technological era. New technologies have evolved rapidly to make our life easier and more convenient. Millions of mobile applications have been developed to suffice our needs, and the chat application is one of the most essential software that every handheld communicating device should have. The users need a chat application which is easy to use, fast and secure. Our purpose is to develop a mobile messaging application that can connect users with each other for communication purpose based on their hobby. This application was built using Java and Firebase. Android is a mobile operating system exclusively created and developed for handheld devices. Java is a programming language that is a faster and efficient programming language to learn with less syntax to use for developing an android application. The database of this application is stored on Firebase which is a cloud-service and a backend development platform. Firebase will keep the data more secure and will increase the performance of the application. In conclusion, the application is named as “Viber” with specific functions that meets the basic needs of a messaging application with an easy-to-use user interface. KEYWORDS: Communications; firebase; android; Instant messaging; real-time databases; group messaging; hobby; i TABLE OF CONTENTS CHAPTER TITLE NO 1 INTRODUCTION 1.1 ANDROID OPERATING SYSTEM 1.2 ANDROIDAPPLICATION DEVELOPED USING PAGENO 1 2 2 JAVA 2 1.3 OBJECTIVE OF THE PROJECT 1.4 METHODOLOGY LITERATURE SURVEY 2.1 INTRODUCTION 2.2 LITERATURE REVIEW 2.2.1 Android Based Instant Messaging Application Using Firebase 2.2.2 Android Chat Application 3 3 5 5 5 5 2.2.3 Are All Chats Suitable for Learning Purposes 6 2.2.4 Doctor-Patient Real Time Chat Application 6 2.2.5 An Online Chat Application For Android Smartphone 3 SYSTEM REQUIREMENT SPECIFICATION 7 3.1 INTRODUCTION 7 3.2 HARDWARE REQUIREMENT 7 3.3 SOFTWARE DESCRIPTION 7 3.4 SOFTWARE SPECIFICATION 7 3.4.1 ANDROID STUDIO BUMBLEBEE 7 3.4.2 JAVA 8 3.4.3 GRADLE 9 3.4.4 GOOGLE FIREBASE 9 3.4.5 THE BUILD PROCESS FOR AN ANDROID 10 APPLICATION PACKAGE 4 PROJECT DESCRIPTION ii 11 5 4.1 EXISTING SYSTEM 11 4.2 PROPOSED SYSTEM 11 4.3 LIST OF MODULES 12 4.3.1 SPLASH SCREEN 12 4.3.2 LOGIN SCREEN 12 4.3.3REGISTER SCREEN 13 4.3.4 CHAT SCREEN 13 4.3.5 CHAT ACTIVITY 13 4.3.6 GROUP FRAGMENT 14 4.3.7 LOGOUT 14 4.3.8 SETTINGS 14 4.3.9 PROFILE 14 RESULT AND DISCUSSION 15 5.1 SPLASH SCREEN 15 5.2 LOGIN SCREEN 15 5.3 REGISTER SCREEN 16 5.4 HOBBY SCREEN 16 5.5 USERS SCREEN 17 5.6 CHAT SCREEN 18 5.7 PROFILE SCREEN 18 5.8 SETTING SCREEN 19 REFERENCES 20 iii TABLE OF FIGURES FIGURE NO FIGURE NAME PAGE NO 3.1 Gradle Process 7 3.2 Firabase Process 9 3.3 Build Apk process 10 4.1 Flow Diagram 10 5.1 Splash Screen 15 5.2 Login Screen 16 5.3 Register Screen 16 5.4 Hobby Screen 17 5.6 User’s Screen 17 5.7 Chat Screen 18 5.8 Profile Screen 19 5.9 Setting Screen 19 iv CHAPTER 1 INTRODUCTION Various messaging apps like WhatsApp and Facebook will provide a way to chat with known people. They provide a simple way to connect with people who are already in our contact list. The main objective of this application is to introduce a methodology to provide messaging services over the internet that allows Android-based smartphone users to chat with any person in the world about their hobbies. This application is to chat with strangers to share and discuss our ideas and thoughts with them and Google Firebase as a real-time backend database which provides real-time data connectivity using peer-to-peer connection. 1.1 ANDROID OPERATING SYSTEM The mobile application industry is advancing rapidly with the advent of new mobile technologies. Consisting of several operating systems like Symbian OS, iOS, BlackBerry, etc., Android OS is recognised as the most widely used, popular, and user-friendly mobile platform. This open-source Linux kernelbased operating system offers high flexibility due to its customization properties, making it a dominant mobile operating system. Android applications are programmed in Java. The Google Android SDK delivers a special software stack that provides developers with an easy platform to develop Android applications. Moreover, developers can make use of existing Java IDEs, which provides flexibility to the developers. Third-party application development relies heavily on Java libraries. With the help of these approaches, an application can be deployed to several platforms without the need for changes in coding. However, Android is more prone to security issues. Any Android developer can upload their application on the Play Store, which can cause a security threat to any Android device. 1.1 ANDROID APPLICATION DEVELOPED USING JAVA 1 Java is the technology of choice for building applications using managed code that can be executed on mobile devices. Android is an open-source software platform and a Linux-based operating system for mobile devices. The Android platform allows developers to write managed code using Java to manage and control the Android device. Android applications can be developed using the Java programming language and the Android SDK. So, familiarity with the basics of the Java programming language is a prerequisite for programming on the Android platform. 1.2 OBJECTIVE OF THE PROJECT Developing an interactive user-friendly software for efficient communication within members of likeminded society based on their hobbies. This android application software developed using java and firebase will provide a common platform for efficient information exchange among people with similar interests to explore more perspectives. 1.3 METHODOLOGY The application will take the new users to the registration page and get the required information from them. After a successful registration, the user will need to sign in to use the application. The passwords are encrypted and stored in the Firebase, and for every user it will create a unique id to identify the user. Then, after successfully logging in, the user will be redirected to the main page of the application where they can see the floating icons. The floating icons will have a set of hobbies. The user can choose any one of the hobbies from the list. Then the other users who have the same hobby will be shown to users. Then the user can start chatting with each other. One of the primary benefits is that the user's contact information is not displayed to others. 2 CHAPTER 2 LITERATURE SURVEY 2.1 INTRODUCTION The innovative ideas and concepts which helped for the proposal of this system were taken from the following references. This has helped in gaining information regarding the works and procedures of the existing systems. Encapsulating the advantages and disadvantages of various existing systems henceforth helped in modifying the project. 2.2 LITERATURE REVIEW 2.2.1 Android Based Instant Messaging Application Using Firebase The main objective is to present a software application for the launching of a real time communication between operators/users. The system developed on android will enable the users to communicate with another users through text messages with the help of internet. The system requires the device to be connected via internet. This application is based on Android with the backend provided by google Firebase. 2.2.2 Android Chat Application The main objective of this application is to present a software for the launching of a real time communication between operators/users. The system developed on android will enable the users to communicate with another users through text messages with the help of internet. The system requires the device to be connected via internet. This application is based on Android with the backend provided by google Firebase for Authentication and PHP server for overall Application. 2.2.3 Are All Chats Suitable For Learning Purposes The Chat is being used for more than one decade in learning environments as a useful Computer Supported Collaborative Learning (CSCL)Tool . However, 3 nowadays some students still usually face accessibility barriers when using Chats and, as a result, they cannot learn in the same way as their classmates. Thus, some of the equality principles of education are not accomplished. This paper shows a study of chat’s characteristics and analyses if commercial Chats with general purposes can be used for learning environments in an accessible way. This study has been carried out from the point of view of the Universal Design for Learning (UDL) guidelines. 2.2.4 Doctor-Patient Real Time Chat Application During the pandemic, most of the working population spent most of their time doing sedentary desk jobs. As a result, they may have developed inadequate spine posture, which can cause profound implications such as back pain if not corrected at an early stage. Implementation of machine learning and computer vision has allowed us to capture and analyze video input from the user’s cellphone to remind them whenever they are not in the correct position. To further support users, a chat feature has been implemented through which the users can quickly get in touch with orthopedic experts for evaluation and feedback. 2.2.5 An Online Chat Application For Android Smartphone This Application is suitable to apply on lightweight application, so it is suitable to implement on an android chat application. The chat application has been successfully implemented and tested using Android Studio in the JAVA programming language. The database that used in the chat application is the Firebase NoSQL database 4 CHAPTER 3 SYSTEM REQUIREMENT SPECIFICATION 3.1 INTRODUCTION A clear view of the hardware and software requirements of the project is crucial to understand its working. This chapter takes a deep analysis of the various hardware and software requirement for the proposed system. 3.2 HARDWARE REQUIREMENT The Minimum Hardware requirements for this project are, • Android Device (Android OS 10 and Above) • Read Only Memory (ROM) 2000MB • Random Access Memory (RAM) 8GB 3.3 SOFTWARE DESCRIPTION A software requirements specification is a description of a software system to be developed. It lays out functional and non-functional requirements and may include a set of use cases that describe user interactions that the software must provide. The software requirements are description of features and functionalities of the target system. 3.4 SOFTWARE SPECIFICATION 1. Android Studio Bumblebee (2021.1.1) 2. Java 3. Google Firebase 3.4.1 Android Studio Bumblebee The Android Studio team has been released Android Studio Bumblebee (2021.1.1) and Android Gradle plugin (AGP) 7.1.0; the latest versions of Android official Integrated Development Environment (IDE) and build system. This improved 5 functionality across a broad area of the typical developer workflow: Build and Deploy, Profiling and Inspection, and Design. Some notable additions include a unified test execution between Android Studio and user’s continuous integration (CI) server. 3.4.2 Java The aim of creating Android's development was to create a platformindependent application environment that can run on every device. As we know, Java already has this quality, so Java was chosen for Android development. Android applications run on a special virtual machine called the Dalvik VM, which is based on the Java virtual machine known as the JVM. application can run on any device where a special Dalvik VM is implemented. This way, Android applications are compiled and run in an optimum performance environment with the feature of platform independence. The good approach to software development is the objectoriented approach. Java is based on the oops concept. Android relies heavily on Java fundamentals like classes and objects and its other useful features like oops.Java has an extensive set of libraries. It is easy to take advantage of these libraries. The Android SDK has many standard Java libraries included. 3.4.3 Gradle Gradle is a flexible build automation tool that runs on the Java virtual machine (JVM) and requires a Java development kit. Developers can use Java APIs in their build logic, like plugins and custom task types, and can use the tool on various platforms. Gradle allows the use of a build cache to reuse task outputs from previous runs as well as other optimizations. It has high performance. It can be used in most major IDEs like Android Studio and IntelliJ IDEA, which could import Gradle builds and interact with them. 6 Fig 3.1 Gradle Process 3.4.4 Google Firebase Google Firebase is a Google-backed app development platform that allows developers to create apps for iOS, Android, and the web. Firebase delivers analytics tracking, reporting, and app issue fixes, as well as marketing and product experimentation capabilities. Firebase is a Google Cloud Platform-based Backend-as-a-Service BaaS that began as a next-generation app development platform. The Firebase Realtime Database is a NoSQL database hosted in the cloud that allows users to store and sync data in real time. It's simple to put up, quick, and just requires front-end logic in many circumstances. It allows users to focus on the app rather than on bespoke authentication, web sockets, or database connections. 7 Fig 3.2 Firebase Process A firebase process flow between the multiplatform and server side is depicted in Fig 3.3. 3.4.5 The Build Process for an Android Application Package The Android build system compiles app resources and source code and packages them into Android App Bundles, that are built, tested, deployable, and distributed. Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process which allows to define flexible custom build configurations. Each build configuration can define its own set of code and resources while reusing the parts common to all versions of the app. The Android plugin for Gradle works with the build toolkit to provide processes and configurable settings that are specific to building and testing Android applications. 8 Fig 3.2 Build Apk Process 9 CHAPTER 4 PROJECT DESCRIPTION 4.1 EXISTING SYSTEM WhatsApp: WhatsApp started as an alternative to SMS. It supports sending and receiving a variety of media: text, photos, videos, documents, and location, as well as voice calls. Hike Messenger: Hike Messenger is India's first home-grown messaging platform and is simplifying the way people connect and interact with each other on messaging platforms. Facebook: The most important advantage of a Facebook app is that it helps a business get brand recognition. It makes it possible to spread a business name to a wide audience and expand the reach of a business. There are a million Facebook users. Instagram: People use Instagram to share photos and videos with people in their online network. They also socialize by chatting in DMs in small groups. LinkedIn: People can build connections in your industry and stay in touch with colleagues, past and present. It's an invaluable tool for job searches and recruitment, and a great way to stay up to date with industry news, enhance your professional reputation, and increase the visibility of your brand. 4.2 PROPOSED SYSTEM All the chats will be stored at the Firebase. Users will be able to simultaneously switch their hobbies. The application provides functionality to chat with the Internet. So, if the user is far away, they can do chatting with internet connectivity. The user can delete the sent message at any time. The user can react to the messages they sent and received. There is a global chat feature that enables them to chat together and connect with each other. 10 Fig 4.1 Flow Diagram 4.3 LIST OF MODULES 4.3.1 Splash Screen This module represents the splash screen. A splash screen can appear while a app is launching. Splash screen contains our application logo and loading screen for 5 seconds. After 5 seconds, then it displays a login page. 4.3.2 Login Screen This module represents the login screen. The login page allows a user to gain access to an application by entering their username password and role such as data 11 owner, data user, trusted authority for the user to navigate the application. Quite often a logon necessitates that the user has a username, a password, and their role. Often, the username must conform to a limited length such as eight characters and the password must contain at least one digit and not match a natural language word. The username is freely known and is obvious when entered at a console or other information gadget. The password should be kept secret (and is not shown as it is entered). A user navigates to an application and is given a login page as an approach to access the application. The two anticipated results are: • Authentication is successful and the user is directed to the landing page. • Authentication fails and the user remains on the login page. If authentication fails, the screen shows an informational or error message about the failure. The error message occurs due to invalid password or username or the role. In case it might be the deregister account for the logging of the page. A user is automatically logged out due to inactivity/network issues. In this event, they will be returned to the login page, which will display an informational message explaining what happened. Once the user logs in again, they will be taken back to the page they were previously on before being out. The Data Owner, Data User, and Trusted Authority log in to the page by providing the correct username, password, and role. If any of these are incorrect, an error message will appear on the login page, prompting the user to provide the correct username, password, and role. 4.3.3 Register Screen This module represents the register page. A registration form is a list of fields that a user will input data into and submit to a company or individual. There are many reasons why user would want a person to fill out a registration form. In this software we use registration forms to sign up clients for sharing and viewing their shared file with high security and for other programs or plans. 12 Here we prescribe the details from the users such as username, password, name, roll number, email for the registration purpose. The username, password, name all these are common for the registration purpose and other fields are used for access control such as roll number, email. 4.3.4 Chat Screen: All the chats of the user will be shown in Chats Fragment which will be automatically retrieved in regular intervals. Contacts present within the android device which have registered with the application are synced and displayed 4.3.5 Chat Activity: All the messages with the specific user are shown in Chat activity. User can delete the sent message at any time. 4.3.6 Groups Fragment: Groups can also be viewed separately. So, the user can manage & see all the groups together. 4.3.7 Log out: Logging out helps prevent other users from accessing the system without verifying their credentials. It also helps protect the current user's access or prevent unauthorized actions on the current login session and is thus an important part of security. Logging out ensures that user access and user credentials are safe after the login session. 4.3.8 Settings: Setting allows the user to reset the password and to changes their username. 13 4.3.9 Profile: User profile. A directory of stored user settings, information, and other information of the user account. 14 CHAPTER 5 RESULT AND DISCUSSION The application has been completed and is now running on the Android Device. This chapter provides a comprehensive overview of numerous results and output screens, as well as a complete explanation of the project with screenshots. 5.1 SPLASH SCREEN This screen contains application logo and loading screen for 2 seconds. After 2 seconds, then it displays a login page. Fig 5.1 Splash Screen Fig 5.1 represents the splash screen. A splash screen can appear while a game or program is launching. 5.2 LOGIN SCREEN Fig 5.2 represents the login screen. This is the login page of this application. The login page allows a user to an application by entering their username password . 15 Fig 5.2 Login Screen 5.3 RIGISTER SCREEN: Fig 5.3 represents the register page. This module represents the register page. A registration form is a list of fields that a user will input data into and submit to application. Fig 5.3 Register Screen 5.4 HOBBY SCREEN 16 This Screen represents the static hobby list. In this screen, the use can choose any one hobby from the list provided. This is shown in Fig 5.4 Fig 5.4 Hobby Screen 5.5 USERS SCREEN Fig 5.5 shows the users available when the user has choose the same hobby simultaneously. 17 Fig 5.5 user’s screen 5.6 CHAT SCREEN Fig. 5.6 display how the chatting adapter will look like, Fig. 5.6 Chat Screen 5.7 PROFILE SCREEN Profile Screen has some components like Username, Interest, Profile picture. Those elements are shown in Fig 5.7 18 Fig 5.7 Profile Screen 5.8 SETTING SCREEN Setting activity has some basic feature like profile activity, reset password, about Screen, and logout activity. Fig. 5.8 Fig 5.8 Setting Screen 19 REFERENCE: [1.] Fernández-Vera F, Urrutia DC, Rossel PO, Herskovic V, Fuentes C. 2022. Social+Me: a persuasive application to increase communication between students and their support networks in Southern Chile. PeerJ Computer Science 8:e848 https://doi.org/10.7717/peerj-cs.848 [2.] Cuadrado J, Vilaplana J, Mateo J, Solsona F, Solsona S, Rius J, Alves R, Camafort M, Torres G, Betriu A, Gutierrez JM,Fernández E. 2016. HBPF: a Home Blood Pressure Framework with SLA guarantees to follow up hypertensive patients. PeerJ Computer Science 2:e69 https://doi.org/10.7717/peerj-cs.69 [3.] Michelle Drouin, Susan Sprecher, Robert Nicola, Taylor Perkins, Is chatting with a sophisticated chatbot as good as chatting online or FTF with a stranger?, Computers in Human Behavior, Volume 128,2022,107100,ISSN07475632,https://doi.org/10.1016/j.chb.2021.107100. (https://www.sciencedirect.com/science/article/pii/S0747563221004234) [4.] Melanie Eckert, Zeki Efe, Lukas Guenthner, Sabrina Baldofski, Katharina Kuehne, Richard Wundrack, Julia Thomas, Shadi Saee, Elisabeth Kohls, Christine Rummel- Kluge,Acceptability and feasibility of a messenger-based psychological chat counselling service for children and young adults (“krisenchat”): A crosssectional study, Internet Interventions,Volume 27,2022,100508,ISSN 22147829,https://doi.org/10.1016/j.invent.2022.100508. (https://www.sciencedirect.com/science/article/pii/S221478292200015X) [5.] Rocío Calvo, Alberto Arbiol, Ana Iglesias,Are All Chats Suitable for Learning Purposes? A Study of the Required Characteristics,Procedia Computer Science,Volume 27,2019,Pages 251-260,ISSN 1877-0509,https://doi.org/10.1016/j.procs.2014.02.028. (https://www.sciencedirect.com/science/article/pii/S1877050914000301) 20 [6.] V. Bhavsar, Y. Bhakre, R. Pradhan, D. Rodrigues and S. Bhosle, "Location Based Chat Android Application," 2021 2nd Global Conference for Advancement in Technology (GCAT),2021, pp. 1-5, doi: 10.1109/GCAT52182.2021.9587671. [7.] V. S. A. Retna, P. Brundha and G. RajKumar, "People’s Behaviour Analysis in Chat Message using Natural Language Processing," 2021 Third International Conference on Intelligent Communication Technologies and Virtual Mobile Networks (ICICV), 2021, pp. 1128-1133, doi: 10.1109/ICICV50876.2021.9388596 [8.] S. Shukla, S. C. Gupta and P. Mishra, "Android-Based Chat Application Using Firebase," 2021 International Conference on Computer Communication andInformatics (ICCCI), 2021, pp. 1-4, doi: 10.1109/ICCCI50826.2021.9402510. [9.] Maurya, A., Mali, S., Thakare, J., Bagewadi, S., Gori, D. and Khan, S., 2022.Android Chat Application. Available at SSRN 4109045 [10.] Emmadi, Sai Spandhana Reddy, and Sirisha Potluri. "Android based instant messaging application using firebase." International Journal Recent Technology and Engneering 7, no. 5 (2019): 352-355 [11.] https://publisher.uthm.edu.my/periodicals/index.php/aitcs/article/view/2288 21