Search code examples
androidandroid-activityfirebaseimplementationmobile-application

Android simple chat using firebase implementation on github


Hi can anybody have a suggestion on how t implements this simple android chat app in github? https://github.com/firebase/AndroidChat . i need to implement that link for exercising on how to create a simple chat application for android using firebase live. It says there to change the URL in “mainactivity” afterward i do not have any idea at all. i am new in firebase and did make some research on how to manage app. unfortunately I’ve seen this source in github. But the thing is that I don’t have any idea on how to implement it. Suggestions guys on how to run into i think HTML and it will be link on my URL in firebase?

Hoping someone can view this.


Solution

  • It says you need the URL to point to your own Firebase server. It is free and easy to create. When you stand on the Viewing my first app screen in Firebase, you can see your Firebase's URL in the browser, which is what you need in MainActivity. Have you checked out the Firebase quickstart guide?

    If you take a look at the sample project's dashboard in your browser, you can see this data structure:

    chat
      randomlyGeneratedMessageId1
        author: "jane1994"
        message: "hi there"
      randomlyGeneratedMessageId2
       author: "johndoe"
       message: "asdasd"
    

    You are going to have the same data structure. It is automatically created if you write and send a message from the example app.

    EDIT: It is much simpler than you think. No localhost or anything is involved. Steps:

    1. Have a Firebase account
    2. Log in
    3. Click hereFirebase screenshot
    4. Now you can see all the data you have in the cloud. It is already live. If you give the .apk to any friend and they run the app on their Android device, they can already send data through the app to your own server.

    EDIT2:

    The thing you found on GitHub is an Android Studio project. You can only open and run it using Android Studio.

    After you compile the project using Android Studio and you have the .apk, you can use it as any other .apk.