How to integrate Firebase into Android App – Android Studio

Firebase is a mobile and web application development platform developed by Google. We can build our apps very fast, without making complex back-end system. It helps to scale automatically, for even the largest apps. In this tutorial, we’re gonna go through the steps to integrate Firebase into Android App with Android Studio Enviroment.

I. Technology

– Android Studio 2.x
– Firebase Android SDK 11.x

II. Step by Step

1. Get SHA-1 Key

– Open your Android Project, in Gradle projects window, double-click on signingReport:
firebase-signingreport

– Look at Run window, you can find SHA-1 Key:
firebase-sha-1

2. Create Project on Firebase

Go to Firebase Console, login with your Google Account, then click on Add Project.

Enter Project name, select Country/Region:
firebase-create-project

Press CREATE PROJECT, a Popup will be shown.

3. Add Firebase to Android App
3.1 Register App

Fill Android package name, App nickname, and SHA-1 (got from step 1):
firebase-register-app

Click on REGISTER APP.

3.2 Download and add config file

– Click on Download google-services.json to download the config JSON file:
firebase-download-config-file

– Move google-services.json into your Android App root directory:
firebase-config-file

Click on CONTINUE. You will come to:
firebase-add-sdk

3.3 Add Firebase SDK

– Open build.gradle (project-level), add:

buildscript {
    // ...
    dependencies {
        // ...
        classpath 'com.google.gms:google-services:3.1.0'
    }
}

firebase-add-sdk-project-level

– Open build.gradle (App-level), add:

dependencies {
  // ...
  compile 'com.google.firebase:firebase-core:11.0.2'
}

apply plugin: 'com.google.gms.google-services'

firebase-add-sdk-app-level

– Re-sync Gradle files:
Tool -> Android -> Sync Project with Gradle Files.

III. When sync fails

– Make sure that package_name in google-services.json has a correct value according to:
+ applicationId in build.gradle (App-level).
+ package in AndroidManifest.xml.

– Open SDK Manager to update:
+ Google Play services
+ Google Repository

140 thoughts on “How to integrate Firebase into Android App – Android Studio”

  1. Hey! This is my first visit to your blog! We are a team of volunteers and starting a
    new project in a community in the same niche.

    Your blog provided us valuable information to work
    on. You have done a outstanding job!

  2. Have you ever thought about including a little bit more than just your articles?
    I mean, what you say is fundamental and all. However just imagine
    if you added some great visuals or video clips to give your posts
    more, “pop”! Your content is excellent but with pics and clips,
    this blog could certainly be one of the best in its field.

    Amazing blog!

  3. Great blog you have here but I was wanting to know
    if you knew of any community forums that cover the same
    topics talked about here? I’d really like to be a part
    of group where I can get responses from other
    knowledgeable people that share the same interest.

    If you have any recommendations, please let me know.
    Thanks!

  4. Hi are using WordPress for your site platform? I’m new to
    the blog world but I’m trying to get started and set up my own. Do
    you require any coding knowledge to make your own blog?
    Any help would be greatly appreciated!

  5. Hello, I think your web site might be having web browser compatibility problems.

    When I take a look at your web site in Safari, it looks fine however when opening in Internet Explorer,
    it’s got some overlapping issues. I simply wanted to give you a quick heads up!
    Other than that, fantastic site!

  6. Hi! I just wanted to ask if you ever have any trouble with hackers?
    My last blog (wordpress) was hacked and I ended up losing months of hard work due to
    no back up. Do you have any methods to protect against hackers?

  7. This is very interesting, You’re a very skilled blogger. I’ve joined your feed
    and look forward to seeking more of your wonderful post.
    Also, I’ve shared your web site in my social networks!

  8. Wе stumbbled ᧐ver here different webseitе and thought I maʏ as well check things
    out. Ilike what I see so now i’m following you. Looк forward to ⅼooking into your web page yet again.

  9. Nice poѕt. I learn sоmething totally new and сhallenging on sites I stumbleupon on a daily basіs.
    It wioll always be еⲭciting to rread articles from other
    authors and practice a little something from otheг
    websites.

  10. Thanks for ones marvelous posting! I really enjoyed reading it,
    you might be a great author.I will make certain to bookmark your blog and
    may come back someday. I want to encourage you to ultimately continue your great posts, have a nice day!

  11. My partner and I stumbled over here coming from a different website and thought
    I may as well check things out. I like what I see so now i’m
    following you. Look forward to finding out about your web page repeatedly.

  12. I loved as much as you’ll receive carried out right here.
    The sketch is attractive, your authored subject matter stylish.

    nonetheless, you command get bought an impatience over
    that you wish be delivering the following. unwell unquestionably come
    more formerly again since exactly the same nearly a lot often inside case you shield this increase.

  13. Greetings! This is my first visit to your blog! We are a group of volunteers and
    starting a new project in a community in the same niche. Your blog provided
    us valuable information to work on. You have done a marvellous job!

  14. I was suggested this blog by my cousin. I’m not sure whether this post is written by
    him as no one else know such detailed about my difficulty.

    You’re wonderful! Thanks!

  15. Heya i’m for the first time here. I found this board and
    I find It really useful & it helped me out a
    lot. I hope to give something back and aid others like you aided me.

  16. I’m truly enjoying the design and layout of your website.
    It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more
    often. Did you hire out a designer to create your theme? Superb work!

  17. It’s a shame you don’t have a donate button! I’d certainly donate to
    this fantastic blog! I suppose for now i’ll settle for bookmarking and adding your RSS feed to my Google account.
    I look forward to fresh updates and will share this blog with my Facebook group.

    Talk soon!

  18. Hi there, You’ve done an excellent job. I’ll definitely digg it and
    personally suggest to my friends. I am confident they’ll be benefited from
    this web site.

  19. Great beat ! I would like to apprentice whilst you amend your site,
    how can i subscribe for a blog website? The account helped me
    a applicable deal. I were a little bit familiar of
    this your broadcast offered brilliant clear concept

  20. Wow! This blog looks just like my old one! It’s on a entirely different subject but it has pretty much the same
    layout and design. Wonderful choice of colors!

  21. When someone writes an post he/she maintains the thought of a user in his/her brain that
    how a user can be aware of it. Therefore that’s why this paragraph is outstdanding.
    Thanks!

  22. Howdy this is kinda of off topic but I was wondering
    if blogs use WYSIWYG editors or if you have to manually code
    with HTML. I’m starting a blog soon but have no coding experience so I
    wanted to get advice from someone with experience.
    Any help would be greatly appreciated!

  23. Hey! This is my 1st comment here so I just wanted to give a quick shout out and say I genuinely enjoy reading your posts.
    Can you suggest any other blogs/websites/forums that deal with the same topics?
    Thanks a lot!

  24. Generally I don’t learn article on blogs, however I wish to say that this
    write-up very compelled me to check out and do it! Your writing style has been surprised me.
    Thank you, quite great article.

  25. Hi would you mind letting me know which web host you’re working with?
    I’ve loaded your blog in 3 different web browsers and
    I must say this blog loads a lot quicker then most. Can you recommend a good internet hosting provider at a reasonable
    price? Kudos, I appreciate it!

  26. Hello just wanted to give you a brief heads up and let you know a few of the
    images aren’t loading properly. I’m not sure why but I think its a linking issue.
    I’ve tried it in two different browsers and both show the same results.

  27. Ꮲrеtgty section of cߋntеnt. I just stumbled upon your web site and in ɑcceѕsion capital to assert that I
    get iin fact enbjoyed account your bpog posts. Anyway I will be subscribing too youг feeds
    and even I achievement yyou accesѕ consistently
    quickly.

  28. Please let me know if you’re looking for a writer for
    your site. You have some really great articles and I feel I would be a good asset.
    If you ever want to take some of the load off,
    I’d absolutely love to write some material for your blog
    in exchange for a link back to mine. Please blast me an e-mail if interested.
    Thanks!

  29. Do you mind if I quote a few of your posts as long as I provide credit and sources back to your weblog?
    My blog site is in the very same area of interest as yours and my visitors would certainly benefit from a
    lot of the information you provide here. Please let me know if
    this okay with you. Many thanks!

  30. I don’t know if it’s just me or if perhaps everyone else encountering issues
    with your site. It appears as if some of the written text on your content are running off the screen. Can someone else please comment
    and let me know if this is happening to them as well?

    This may be a issue with my web browser because I’ve had this happen before.
    Thanks

  31. With havin so much content do you ever run into any problems of plagorism or copyright violation? My blog has a lot of unique content I’ve either authored myself or outsourced but it appears a lot of
    it is popping it up all over the web without my agreement.
    Do you know any ways to help protect against content from being stolen? I’d genuinely
    appreciate it.

  32. After looking into a handful of the blog articles on your blog,
    I seriously appreciate your way of writing a blog.
    I book-marked it to my bookmark site list and will be checking back soon. Please visit my web site too and
    let me know what you think.

  33. We’re a gaggle of volunteers and opening a brand new scheme in our community.
    Your web site offered us with useful information to work on. You’ve done an impressive task and our entire community shall be
    grateful to you.

  34. hello there and thank you for your information – I have certainly
    picked up anything new from right here. I did however expertise a few
    technical issues using this web site, as I experienced to reload the
    web site many times previous to I could get it to
    load correctly. I had been wondering if your web host is OK?
    Not that I’m complaining, but sluggish loading instances times will very frequently affect your placement
    in google and can damage your high quality score if ads and marketing with Adwords.
    Well I am adding this RSS to my e-mail and can look
    out for a lot more of your respective fascinating content.
    Ensure that you update this again very soon.

  35. Hi my loved one! I want to say that this article is amazing, great written and include approximately all significant infos.
    I’d like to look more posts like this .

  36. Thank you for any other fantastic post. Where else
    may just anybody get that kind of information in such an ideal way of writing?
    I have a presentation next week, and I’m on the search for such info.

  37. Howdy! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my blog to rank for some targeted keywords but
    I’m not seeing very good results. If you know of any please share.
    Appreciate it!

  38. An intriguing discussion is definitely worth comment.

    I think that you should write more about this subject matter,
    it might not be a taboo subject but generally folks don’t speak about such issues.
    To the next! Many thanks!!

  39. I think that what you said made a ton of sense. But, consider this, suppose you composed a catchier title?
    I am not saying your information is not good, however what if you added a post title to maybe get people’s attention?
    I mean ozenero | Mobile & Web Programming Tutorials is
    kinda vanilla. You ought to look at Yahoo’s front page and note how they create article
    titles to grab viewers to open the links. You might add a video or a related pic or two
    to grab readers excited about everything’ve got to say.
    In my opinion, it could bring your posts a little
    bit more interesting.

  40. Hi, i believe that i saw you visited my weblog thus i
    came to return the want?.I am attempting to to find issues to improve my site!I guess its good enough to
    make use of a few of your ideas!!

  41. Hello my friend! I want to say that this article is amazing,
    nice written and come with almost all vital infos. I would like to peer extra
    posts like this .

  42. Greate pieces. Keep writing such kind of info on your site.
    Im really impressed by it.
    Hi there, You have performed a great job. I will definitely digg it
    and for my part suggest to my friends. I am sure they’ll be benefited from
    this website.

  43. Hello just wanted to give you a brief heads up and let you know a few of the pictures
    aren’t loading correctly. I’m not sure why but I think its a linking issue.
    I’ve tried it in two different web browsers and both show
    the same results.

  44. I believe this is one of the most vital information for me.
    And i’m glad reading your article. However should observation on some general issues, The site taste is perfect,
    the articles is actually nice : D. Good task, cheers

  45. My brother recommended I would possibly like this website.

    He used to be totally right. This post truly made my day.

    You can not believe simply how so much time I had spent for this info!
    Thank you!

  46. Good day! I know this is kind of off topic but I was wondering which blog platform are you using for this site?
    I’m getting fed up of WordPress because I’ve had problems with hackers and I’m looking at alternatives for another platform.

    I would be great if you could point me in the
    direction of a good platform.

  47. I’m not that much of a online reader to be honest but
    your blogs really nice, keep it up! I’ll go ahead and bookmark your website to come back down the road.
    Many thanks

  48. Hey I know this is off topic but I was wondering if you knew of any widgets I could add to
    my blog that automatically tweet my newest twitter updates.
    I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience
    with something like this. Please let me know if you run into anything.

    I truly enjoy reading your blog and I look forward to your new updates.

  49. Hi! I realize this is sort of off-topic but I needed to ask.
    Does building a well-established website like yours require a large amount
    of work? I’m brand new to blogging but I do write in my journal daily.
    I’d like to start a blog so I can share my own experience and thoughts
    online. Please let me know if you have any kind of
    recommendations or tips for new aspiring bloggers.

    Appreciate it!

  50. Howdy! I could have sworn I’ve visited this web site
    before but after going through a few of the posts I realized it’s
    new to me. Regardless, I’m definitely pleased
    I stumbled upon it and I’ll be book-marking it and checking
    back often!

  51. Hey there, I think your blog might be having browser compatibility issues.
    When I look at your blog in Chrome, it looks fine but when opening in Internet Explorer, it has some overlapping.

    I just wanted to give you a quick heads up! Other then that, wonderful blog!

  52. I really love your site.. Excellent colors & theme. Did you develop this web site yourself?
    Please reply back as I’m wanting to create my very own site and
    would love to find out where you got this
    from or exactly what the theme is called. Thanks!

  53. My brother recommended I might like this website.

    He was totally right. This post actually made my day.
    You cann’t imagine just how much time I had spent for this info!
    Thanks!

  54. I know this if off topic but I’m looking into starting
    my own blog and was curious what all is needed to get set up?
    I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very internet smart so I’m not 100%
    positive. Any recommendations or advice would be
    greatly appreciated. Many thanks

  55. Hmm it appears like your blog ate my first comment (it was
    extremely long) so I guess I’ll just sum it
    up what I wrote and say, I’m thoroughly enjoying your blog.
    I as well am an aspiring blog writer but I’m still new to the whole thing.
    Do you have any tips and hints for beginner blog writers?
    I’d definitely appreciate it.

  56. It’s nearly impossible to find knowledgeable people in this particular topic, however, you seem like you know what you’re talking about!
    Thanks

  57. I am now not sure where you are getting your info, but great topic.
    I needs to spend a while studying more or working out more.

    Thanks for excellent information I used to be searching
    for this information for my mission.

  58. Can I simply say what a comfort to uncover someone
    that actually knows what they are discussing on the web.
    You certainly understand how to bring an issue to light and make it important.
    More people really need to check this out and understand this side of the story.
    I can’t believe you’re not more popular since you certainly have
    the gift.

  59. Hmm it looks like your site ate my first comment (it was extremely
    long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying
    your blog. I too am an aspiring blog writer but I’m still new to the whole thing.
    Do you have any suggestions for inexperienced blog writers?
    I’d genuinely appreciate it.

  60. You have made some decent points there. I checked on the
    net for more information about the issue and found most people
    will go along with your views on this site.

  61. Its such as you read my thoughts! You seem to grasp
    so much about this, like you wrote the ebook in it or something.
    I think that you can do with a few p.c. to force the message home a bit, however other than that, this is magnificent blog.
    A great read. I will certainly be back.

  62. My brother recommended I would possibly like this website.
    He was once totally right. This post truly made my day.
    You can not imagine simply how a lot time I had spent for this information! Thank
    you!

  63. We stumbled over here different web address and thought I may as well check things out.

    I like what I see so now i’m following you. Look forward to looking at your web page repeatedly.

  64. Have you ever considered about including a little bit mmore than just your
    aгtіcles? I mean, what you say is important and all. Нοweᴠeг think abоut іf you added some great pictures or video clipss to give your posts more,”pop”!
    Your content is excellent but with images andd videos, this blog could definitely be onne of
    the greatest in its fieⅼd. Fantastic bⅼog!

  65. After going over a few of the articles on your web page, I seriously like
    your way of blogging. I saved it to my bookmark site list and
    will be checking back soon. Take a look at my web site too and let me know your
    opinion.

  66. I know this if off topic but I’m looking into starting
    my own blog and was wondering what all is needed to get setup?

    I’m assuming having a blog like yours would cost a pretty
    penny? I’m not very web smart so I’m not 100% positive.
    Any tips or advice would be greatly appreciated. Appreciate it

  67. My partner and I stumbled over here different web page and thought I might as well check things out.
    I like what I see so now i am following you. Look forward to
    looking over your web page for a second time.

  68. Amazing blog! Is your theme custom made or did you download it
    from somewhere? A design like yours with a few
    simple adjustements would really make my blog jump out.

    Please let me know where you got your theme. Bless you

  69. Great beat ! I would like to apprentice while you amend your
    website, how could i subscribe for a blog website?
    The account aided me a acceptable deal. I had been a little bit acquainted of this
    your broadcast offered bright clear idea

  70. Hi there! I just wanted to ask if you ever have any issues with hackers?

    My last blog (wordpress) was hacked and I ended up losing months of hard work
    due to no back up. Do you have any methods to stop hackers?

  71. Today, I went to the beach with my kids. I found a sea shell and gave it to my 4 year
    old daughter and said “You can hear the ocean if you put this to your ear.” She put the shell to her
    ear and screamed. There was a hermit crab inside and it pinched her ear.
    She never wants to go back! LoL I know this is totally off topic but I had
    to tell someone!

  72. This design is incredible! You most certainly know how to keep a reader
    amused. Between your wit and your videos, I was almost moved to start my
    own blog (well, almost…HaHa!) Wonderful job. I really enjoyed what you had to say, and more
    than that, how you presented it. Too cool!

  73. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point.
    You clearly know what youre talking about, why waste your intelligence on just
    posting videos to your blog when you could be
    giving us something enlightening to read?

  74. Woah! I’m really enjoying the template/theme of this blog.

    It’s simple, yet effective. A lot of times it’s very difficult to get that “perfect balance” between superb usability and visual appearance.
    I must say that you’ve done a very good job with this. Also, the blog loads extremely quick for me on Firefox.
    Exceptional Blog!

  75. Hey, I think your blog might be having browser compatibility
    issues. When I look at your blog site in Firefox, it looks fine but when opening in Internet Explorer,
    it has some overlapping. I just wanted to give you a quick heads up!

    Other then that, excellent blog!

  76. Sweet blog! I found it while searching on Yahoo News.
    Do you have any suggestions on how to get listed in Yahoo News?
    I’ve been trying for a while but I never seem to get there!
    Appreciate it

  77. You are so interesting! I do not believe I’ve truly read something like that before.
    So wonderful to find another person with a few unique thoughts on this topic.
    Seriously.. thanks for starting this up. This website
    is one thing that is needed on the internet, someone with
    a bit of originality!

  78. I’m really inspired with your writing talents
    as well as with the structure to your blog. Is that this
    a paid topic or did you customize it your self?

    Anyway stay up the nice quality writing, it’s uncommon to look a great weblog like this one today..

  79. Does your site have a contact page? I’m having problems locating it but, I’d
    like to shoot you an e-mail. I’ve got some ideas for your blog
    you might be interested in hearing. Either way, great website and I look forward to seeing it improve over time.

  80. I got this web site from my buddy who informed me about this website and
    at the moment this time I am visiting this website and reading
    very informative content at this place.

  81. Hello great website! Does running a blog such as this take a lot of work?
    I’ve absolutely no understanding of coding but I was hoping to start my own blog in the near future.
    Anyway, should you have any ideas or tips for new blog owners please share.
    I know this is off topic but I simply had to ask. Many thanks!

  82. Hi there! I could have sworn I’ve been to this blog before but after reading
    through some of the post I realized it’s new to me.
    Nonetheless, I’m definitely happy I found it and I’ll be bookmarking
    and checking back frequently!

  83. Apⲣreciating the persistence you put into ykur site
    and dеtailed information you provide. It’s great tto come across a blog every
    once in a while that isn’t the same oldd rehasheⅾ information. Gгeat read!
    I’ᴠe bookmarkеd your sіte and I’mincluding your RSS feeԀs to my Google account.

  84. Thank you for the good writeup. It in fact was a amusement account it.
    Look advanced to far added agreeable from you! However, how could we communicate?

  85. Thank you a lot for sharing this with all of us you actually understand what you are
    speaking approximately! Bookmarked. Please also talk over with my website =).
    We may have a hyperlink trade agreement between us

Leave a Reply

Your email address will not be published. Required fields are marked *