Android Firebase Integration Tutorial Use Firebase in Your Mobile App

      Firebase is a set of cloud services from Google that enriches your mobile and web applications seamlessly.  Android Firebase integration makes more user engagement in different ways.


       Firebase doesn't provide legacy cloud services for mobile applications. It has come with real-time database support, holds static content for your apps, push notifications, crash reports, Google Analytics and much more.

Striking features that provided by Google Firebase

1. Real-time database
2. Authentication
3. Storage
4. Hosting
5. Remote config
6. Test lab
7. Crash reporting
8. Cloud messaging
9. Notifications
10. Dynamic links
11. Invites
12. AdMob (implementation re-defined)
13. AdWords

In this tutorial, We will discuss how to set up Android firebase development environment.

Android Firebase Integration : A quick start guide

Prerequisites for Android Firebase Development

1.  A device running Android Gingerbread (2.3) and Google play services 9.2.1 or higher.
2. Android Studio 2.0 (Personally recommend)
3. Create an Android Project (Copy package name to Notepad or somewhere else)

Step 1  Connect Firebase to Your App

Create a Firebase project, Goto Firebase Console 

Give a project name and Select Country from drop down menu.  Hit Create Project button.

Click on "Add Firebase to your Android app"

This window will ask you some information about your project. Paste or enter your package name in "Package Name" field. Hit Add App

It will generate a configuration file called google-services.json Download the file and place into your project > app > google-services.json.

The configuration file contains api_key,client info, project_info including project_number, firebase url, project id, storage bucket etc.

   Press continue to move forward.

Hit Finish button.

Step 2 Android Project Configuration for Firebase

Open your Android project, 

Project level build.gradle 

Add the following inside the dependencies 

classpath ''
App level build.gradle 

Remember : Add the apply plugin line at the bottom of the app level build.gradle file.
apply plugin: ''
Yes you are done! Now to Sync the project press the Sync Now option.

Step 3 How to add available firebase libraries to your project  

If you wish to use Analytics to your app you need to add the following line to app-level build.gradle file.
compile ''

Ruby Tutorial : Let's communicate with Ruby Interactive Shell (IRB)

Let's start with some programming concepts.

Ruby Tutorial for Beginners : IRB

What is a variable ?

A variable is a piece of data that point to a specific name. For instance x=a+b where a and b can take many different values.

Open up command prompt (Ctrl+Alt+T or Win+R "Cmd")

$ irb

irb(main):001:0> a=15
=> 15
irb(main):002:0> b=52
=> 52
irb(main):003:0> c=a+b
=> 67

If you observe the above snippet, a and b store 15, 52 respectively. c stores the summation of a and b.

  Float Type

In Ruby, floats can be defined either with numbers containing a decimal place.

irb(main):001:0> x=3.03
=> 3.03
irb(main):002:0> y=6.3
=> 6.3
irb(main):003:0> z=x+y
=> 9.33
irb(main):004:0> z
=> 9.33


Strings have one or more characters surrounded by quotes. For instance x="Welcome to Ruby programming"

irb(main):001:0> x="Hello"
=> "Hello"
irb(main):002:0> y=",World"
=> ",World"
irb(main):003:0> x
=> "Hello"
irb(main):004:0> y
=> ",World"
irb(main):005:0> d=x+"Hello"
=> "HelloHello"
irb(main):006:0> e=x+y+"Nice"
=> "Hello,WorldNice"
irb(main):007:0> e
=> "Hello,WorldNice"

x contains a string "Hello", y also contains a string ",World". We can concatenate two or more strings using '+' operator.


Booleans can hold only two values true or false.

irb(main):001:0> x=false
=> false
irb(main):002:0> x
=> false

Next lesson we will learn some arithmetical and mathematical operations.

Quick Way to Install Ruby on Your Computer

       We have discussed fascinating features of Ruby and why is Ruby favourite of many developers. It's time to write your very first Ruby program. Let's get started with Ruby.

Quick Way to Install Ruby on Your Computer

Install Ruby on Ubuntu 14.04

Open up the Terminal by holding Ctrl+Alt+T.
Ubuntu uses the apt package manager. You can use it like this:

$ sudo apt-get install ruby-full

Install on Mac OS X

     OS X Yosemite and Mavericks have pre-installed Ruby 2.0.  If you are using an older version of Mac OS X use the homebrew  package manager.

$ brew install ruby

Install on Windows 7/8

If you are on Windows platform, use the installer which helps to install ruby on windows .

Check the Ruby version 

Open up the terminal or Commands prompt (Windows - Go to Ruby folder >bin)

$ruby -v

Check the Interactive Ruby Shell (IRB)

IRB is an interactive shell, IRB allows the execution of Ruby commands with quick response, We can say it as a real-time tool for executing Ruby commands.

puts "Welcome to IRB"

Done! Next lesson we will write a ruby program.

Why is Ruby popular and trending among developers

Ruby is developed by Yukihiro “Matz” Matsumoto , He has blended the language with his favourite languages including Perl,Smalltalk, Eiffel, Ada and Lisp.

If you look into the code of Ruby you will be surprised with its syntax. The creator says “Ruby is simple in appearance, but is very complex inside, just like our human body."

In 2006, Ruby grabbed acceptance from many developers. An adorable fact about Ruby is its free. Not only free of cost but also free to copy,modify and distribute.

In Ruby, everything is  related to an object. Ruby supports strong object-oriented features that available in many other OOP languages.

When you work on Ruby you will feel free to code anything because the language is seen as a flexible. Ruby users can easily alter its parts and user able to redefine the code.

Why is Ruby popular and trending among developers

Striking features of Ruby

1. Well defined exception handling that can able to tackle every error.
2. Ruby features a sweep garbage collector.
3. You can write C extensions easier than other popular procedure-oriented  languages.
4. Ruby supports Operating System independent threading.
5.  Ruby works everywhere! It works on many platforms such as Linux,Unix,Mac OS X, Windows 7/8, DOS,BeOS, OS/2 etc.

Ruby's good looking nature

Ruby uses very limited punctuation moreover it gives more priority to natural English words. Ruby does not need variable declarations. It uses naming conventions to indicate the scope of the variables.

@ and $ are special symbols of Ruby language, @var means that it's an instance variable and $var indicates that it's a global variable. Besides 'var' could be a local variable.

In next lesson, we will install Ruby on your computer.