Contents
I. What is Firebase?
II. Key features of Firebase
III. How much does it cost to use Firebase
IV. How to create a new Firebase project
V. Add an android app to firebase project
VI. How to get Firebase project ID, app ID and web API
VII. How to add an android app to Firebase project
VIII. How to set up Firebase storage
IX. How to set up Firebase DB
X. Conclusion
I. What is firebase
Firebase is a Google owned platform designed to help developers make, manage and scale up their mobile and web applications.
II. Key features of Firebase
Firebase comes with a number of useful features. These include:
• Authentication
Firebase auth allows you to verify the identity of each of your app's users. It currently supports the following authentication methods:
|
|
|
 Phone |
|
|
 Google |
|
|
 Play Games |
|
|
 Game Center
|
|
|
 Facebook |
|
|
 Twitter |
|
|
 GitHub |
|
|
 Yahoo |
|
|
 Microsoft |
|
|
 Apple |
|
|
 Anonymous |
• Database
Firebase database allows you to store and share data between users in real time.
• Storage
This allows the storage of user generated content such as documents, audio, image and video files.
• Hosting
Firebase hosting allows users to securely store data and make it accessible for viewing or sharing over the internet
• Machine learning
• Quality performance and measurement tools
• Analytics
• Growth tools
III. How much does it cost to use firebase?
Firebase is free to use for small applications but it also comes with the option to upgrade to a paid plan as your app grows.
IV. How to create a new firebase project
Visit the firebase website
If you already have an account you can login. If you do not have an account you can create a new account and sign up. After signing in, you will be taken to the screen below.
Click the "Get started" button.
Click 'Create a project'
Name your project and accept the firebase terms by clicking the checkbox. In the project above I named my project 'My lovely app's
Choose a google analytics account to use with firebase. If you do not have a Google Analytics account then you can create one.
Enable Google Analytics for your project by turning on the switch and click 'continue'. A loading screen will be displayed. After it's done loading it will look as shown below. Click 'continue'.
V. How to add an android app to firebase project
Step 1
Our new project's homescreen will look as shown below. The next step is to connect our app to firebase. If you're creating your app on an android platform click the android icon as shown below.
Step 2
You will be taken to the screen below. Choose a name for your android package. Packages are usually named in the following format:
com.my.app
I named my app com.my.lovely app as shown below. I gave it the nickname, social media app. Click 'Register app'
The package name should be similar to the one in your Android Studio, app Inventor or Sketchware project.
If you're using Sketchware and are not sure where to find your package name, go to your Sketchware home screen. Open the project and click 'Advanced settings' as shown below. You can copy and edit the package name here.
Step 3
If you are using a platform like Android studio to create your app you can download the config file.
If you're using Sketchware you will not need this. So simply click 'next'.
Step 4
Scroll down to the page and click next, as shown below.
Step 5
The following step will ask you to run your app to verify installation. We can skip this step for now. So click 'Skip this step' as shown below.
You will be taken back to th project's home screen. You will notice that it says you now have '1 app' as shown below.
VI. How to get Firebase Project ID, Web API and App ID
We however want to link our app. So you will need the following details:
• Project ID
• Project name
• Web API key
• Storage bucket
So the following steps will show how to get your firebase project name, ID, web API key and storage bucket details.
Click the icon next to project overview settings as shown below
A new menu similar to the one below will appear. Click 'Project settings'
Your project name, project ID and web API key will be visible. You can highlight and copy them somewhere.
If you scroll down on your screen, you will see the web API key as shown below.
VII. How to setup Firebase storage
Navigate to the 'Develop' option on your menu as shown below
Click the firebase storage option as shown below.
The screen below will appear. Click 'Next'
Choose your storage location. I simply chose the default item. Click 'Done' to proceed
You will be taken to the following screen. The firebase storage bucket will now be visible, as shown below.
VIII. How to set up Firebase authentication
We will need to choose an authentication method for our app. The most common authentication method is email authentication that is the one we will enable in this tutorial. Sketchware also comes with simple Email authentication.
To get started, navigate to the 'Develop' option on your menu. Click 'Authentication'. After your authentication options appear, click 'Set up sign-in method' as shown below.
Choose the 'Email/Password' option as shown below
Click the switch to enable Email/Password then save as shown below.
The Email/Password authentication method is now enabled as shown below. You can enable any other preferred authentication method using the same method.
IX. How to set up firebase Database
To get started with the creation of your firebase database, navigate to the 'Realtime database option on the main menu. This is highlighted in the image below.
The screen show in the image below will. By default, the 'Start in locked mode'option will be checked. This means that no one can post to your database or view its contents. For us to be able to use our database, select the 'Start in Test Mode'option and then click 'Enable'.
Thats it, you have successfully created yout realtime database. Your screen should now look like the one in the screen below.
X. Conclusion
Firebase provides an easy way to manage the the backend end of your app. This includes handling the authentication, database and storage for your mobile or web application.
Firebase also provides secure cloud storage and you can rest easy knowing your data is encrypted.
When starting as a developer, you can take advantage of Firebase's free tier to create and test out your new apps. You can even upgrade to a paid version as your app grows and develops a new set of needs.
Comments