Giter Club home page Giter Club logo

android_chat_application's Introduction

Firebase Chat App

Welcome to the Firebase Chat App repository! This app enables real-time chat functionality using Firebase as the backend. Below is a list of key files and their functionalities:

Activity Files

  • ChatActivity.java: The main activity for individual chat conversations.
  • LoginOtpActivity.java: Handles user authentication using OTP.
  • LoginPhoneNumberActivity.java: Manages phone number-based user login.
  • LoginUsernameActivity.java: Controls user login using a username.
  • MainActivity.java: The app's entry point and primary navigation hub.
  • SearchUserActivity.java: Allows users to search for other users to initiate chats.
  • SplashActivity.java: Displays a splash screen while the app initializes.

Fragment Files

  • ChatFragment.java: Manages chat UI and logic within the chat activity.
  • ProfileFragment.java: Handles user profile display and editing.
  • SearchUserFragment.java: Displays user search results and options for starting a chat.

Service File

  • FCMNotificationService.java: Integrates Firebase Cloud Messaging for push notifications.

Feel free to explore these files to understand the structure of the app and how different components interact. The app leverages Firebase Authentication, Realtime Database, and Firebase Cloud Messaging to provide seamless chat functionality.

Getting Started

To use this app:

  1. Clone or download the repository.
  2. Set up your Firebase project and update the google-services.json file.
  3. Build and run the app on your Android device or emulator.

Notes

  • This repository provides a basic structure for a Firebase-based chat app. You can extend and customize it as per your requirements.
  • Make sure to handle security and privacy aspects when implementing user authentication and chat features.

For more details about Firebase services and Android app development, refer to the official Firebase Documentation and Android Documentation.

Happy coding!

android_chat_application's People

Contributors

bimalkaf avatar

Stargazers

Feger Viktor avatar FsBotz 1 avatar Eric Golde avatar Nicholas Irvan Winata avatar  avatar Mohammd Shihab Hossain avatar Md Abdul Ahat avatar Ahmet Zincir avatar Yassharth Mani Tripathi avatar  avatar Trương Nguyễn Quang Thái avatar  avatar Emir avatar HSIN-YU WEN avatar  avatar Mahfuz Mia avatar  avatar Ateeb Ashfaque avatar  avatar Divyesh Mali avatar Saju Khan avatar Şevval Özdamar avatar  avatar  avatar  avatar DALTON LEYIAN avatar Antonis Valvis avatar  avatar  avatar  avatar rags avatar Ahmed Zenhom avatar Mohitkumar Soni avatar Sergey avatar Banti Rathod avatar Akshay Poojary avatar

Watchers

 avatar  avatar

android_chat_application's Issues

error while back pressed from the chat Fragment

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionUserModeViewHolder{ca34955 position=1 id=-1, oldPos=0, pLpos:0 scrap [attachedScrap] tmpDetached no parent} androidx.recyclerview.widget.RecyclerView{fe45a14 VFED..... ......I. 0,276-720,475 #7f0801e6 app:id/recycler_view}, adapter:com.suhas.easychat.adapter.SearchUserRecyclerAdapter@67701c8, layout:androidx.recyclerview.widget.LinearLayoutManager@8b8b8dd, context:com.suhas.easychat.SearchActivity@d00caaf
at androidx.recyclerview.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:6544)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6727)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6688)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6684)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2362)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1662)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1622)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:687)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep1(RecyclerView.java:4550)
at androidx.recyclerview.widget.RecyclerView.onMeasure(RecyclerView.java:3975)
at android.view.View.measure(View.java:25532)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:735)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:481)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at androidx.appcompat.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:145)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1552)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:842)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:721)
at android.view.View.measure(View.java:25532)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6957)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:796)
at android.view.View.measure(View.java:25532)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3543)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2369)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2632)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2066)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8417)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972)
at android.view.Choreographer.doCallbacks(Choreographer.java:796)
at android.view.Choreographer.doFrame(Choreographer.java:731)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:250)
2023-12-03 00:22:09.607 2984-2984 AndroidRuntime com.suhas.easychat E at android.app.ActivityThread.main(ActivityThread.java:7806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)

Search user

I didn't get the user details while searching a user in search User menu

Typo in FirebaseUtil.java

Dear Bimal,

First of all - thank you for this fine piece of code, it helps me a lot in setting up an own Firebase chatting app.

When testing your code I found a typo in FirebaseUtils.java:

In timestampToString you are formatting a timestamp to a short string with an "oneliner":
return new SimpleDateFormat("HH:MM").format(timestamp.toDate());
but this will return the hour and Month of the timestamp. Better use this:
return new SimpleDateFormat("HH:mm").format(timestamp.toDate());
to return the hour and minute of the timestamp.

B.t.w.: you should note in your description that the Notification Service is just a stub and not a working feature. I added the necessary files by using the sample file in "https://github.com/firebase/quickstart-android/blob/master/messaging/app/src/main/java/com/google/firebase/quickstart/fcm/java/MyFirebaseMessagingService.java".

Greetings
Michael

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.