0

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.

  • Are you trying to run the project you downloaded from GitHub, or are you trying to implement your own? – Andrea Dusza Aug 29 '15 at 08:21
  • i am trying to run the project ive downloaded from github @AndreaDusza until now i keep pursuing on how to run it and attach it into my firebase so it will make it live. –  Aug 29 '15 at 08:37

1 Answers1

3

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.

Andrea Dusza
  • 2,080
  • 3
  • 18
  • 28
  • thanks for the comment ma'am i tried to run that github simple android app , first i create a firebase URL which is mychatapp . and then download the github link. i set the URL in mainactivity.java and changed it in to my url chatapp. after that i dont have any idea on how to run it totally. i am new in firebase and i came out with this implementing the code link in github. @andrea dusza –  Aug 29 '15 at 08:36
  • See my updated answer. I just downloaded the same sample project and it works for me. – Andrea Dusza Aug 29 '15 at 08:56
  • ok ma'am i am confused on how to run it on browser i tried localhost but ofcourse it will now run because local host runs for php and html . the download file already built with built.gradle etc. the question in here is on how to run the code together with firebase ma'am –  Aug 29 '15 at 08:57
  • owhh , really ??? how? , ok maam am going to follow the rules,, it didn't work for me . what would be the first thing that am going to do? –  Aug 29 '15 at 08:59
  • can you do step by step ma'am? i am new in firebase so i got confused in running this link from github , where to put the code under the sample project's dashboard –  Aug 29 '15 at 09:00
  • how to run? am i going to run on the local host? there are two browser to run right?/ 1 for the firebase and seconde is for the app . i am wondering if how to run the app . is it on the local host or what? thanks –  Aug 29 '15 at 09:14
  • How about the one ive download on github? how can i extract it to the MY FIRST APP? sorry for asking too many questin ma'am just curious . –  Aug 29 '15 at 09:24
  • See my second update. You have to use Android Studio. – Andrea Dusza Aug 29 '15 at 09:25
  • yes maam i see ya second update . as of now i am dwnloading the android studio , i –  Aug 29 '15 at 09:27
  • owh it's 1gb haha. after i download the android studio maam am going to put all the files ive download on github right? but first is to change the URL in the mainactivity that we are pertaining earlier and place it with my URL in fire base right? and that's it? –  Aug 29 '15 at 09:30
  • Yes, but you also need an Android device (phone/tablet) or an Android emulator. Check this: https://developer.android.com/training/basics/firstapp/running-app.html – Andrea Dusza Aug 29 '15 at 09:39
  • thanks @AdreaDuzsa i really appreciated your time and effort . pls allow me to comment in this question for you to notify if ever i have something to ask , thankyou somuch , –  Aug 29 '15 at 09:50
  • If you have something new to ask, post a brand new question on the site because more people see it that way and somebody else probably can answer it better and quicker than me. Another reason for posting new individual questions is that others can find your question using Google and learn from the answer too, but they can hardly find it if you ask it as a comment. Also please mark my answer as accepted so others can know it is answered (and I get reputation points :):)). – Andrea Dusza Aug 29 '15 at 10:11
  • hehe , yes copy maam tnx ,! :D –  Aug 29 '15 at 10:23
  • Great answer @AndreaDusza! – Frank van Puffelen Aug 29 '15 at 16:13
  • @AndreaDusza i put the files in the android studio the i tried to run the app nothing happens . it says that C:\Users\Me\AppData\Local\Android\sdk\tools\emulator.exe -avd Nexus_5_API_23_x86 -netspeed full -netdelay none emulator: ERROR: x86 emulation currently requires hardware acceleration! Please ensure Intel HAXM is properly installed and usable. CPU acceleration status: HAX kernel module is not installed! –  Aug 31 '15 at 11:13
  • what should i click if i want to view the emulator , is the run app? i think there's an error on the emulator device. –  Aug 31 '15 at 11:15
  • When you get an error message, try to look it up on the Internet, because you are likely not the only one facing the problem. This thread is for your problem, try these suggestions: http://stackoverflow.com/questions/26355645/error-in-launching-avd Maybe a tutorial on Android emulators can also be helpful. Personally I use this emulator: http://www.genymobile.com/ – Andrea Dusza Aug 31 '15 at 11:22
  • @AndreaDusza i am now back in this problem , i did skip this test and did a lot of projects . this is the only one which is not done ehe, you just change the URL on the main activity right? then run it on android studio right?? maybe haxm error . anyway yea you are right. my problem , tnx. i will just skip this task. –  Sep 03 '15 at 03:38