0% found this document useful (0 votes)
69 views31 pages

Articles For Report

Firebase is a mobile and web app development platform that provides tools and services to help developers build high-quality apps. It originated as a startup called Envolve that provided an API for integrating chat functionality. Developers began using it to sync app data in realtime across devices, leading to the creation of Firebase as a separate company focused on backend services with realtime functionality. Firebase offers services for developing, testing, and growing mobile and web apps.

Uploaded by

Ahmad Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views31 pages

Articles For Report

Firebase is a mobile and web app development platform that provides tools and services to help developers build high-quality apps. It originated as a startup called Envolve that provided an API for integrating chat functionality. Developers began using it to sync app data in realtime across devices, leading to the creation of Firebase as a separate company focused on backend services with realtime functionality. Firebase offers services for developing, testing, and growing mobile and web apps.

Uploaded by

Ahmad Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

Firebase

Firebase is a mobile and web app development platform that


provides developers with a plethora of tools and services to help
them develop high-quality apps, grow their user base, and earn
more profit.

A Brief History
Back in 2011, before Firebase was Firebase, it was a startup called
Envolve. As Envolve, it provided developers with an API that
enabled the integration of online chat functionality into their
website.
What’s interesting is that people used Envolve to pass application
data that was more than just chat messages. Developers were
using Envolve to sync application data such as a game state in real
time across their users.

This led the founders of Envolve, James Tamplin and Andrew Lee,
to separate the chat system and the real-time architecture. In April
2012, Firebase was created as a separate company that provided
Backend-as-a-Service with real-time functionality.

After it was acquired by Google in 2014, Firebase rapidly evolved


into the multifunctional behemoth of a mobile and web platform
that it is today.

Firebase Services
Firebase Services can be divided into two groups:
Develop & test your app

 Realtime Database

 Auth

 Test Lab

 Crashlytics

 Cloud Functions

 Firestore

 Cloud Storage

 Performance Monitoring

 Crash Reporting

 Hosting

Grow & Engage your audience

 Firebase Analytics

 Invites

 Cloud Messaging

 Predictions

 AdMob

 Dynamic Links

 Adwords
 Remote Config

 App Indexing

Realtime Database
The Firebase Realtime Database is a cloud-hosted NoSQL
database that lets you store and sync between your users in
realtime.

The Realtime Database is really just one big JSON object that the
developers can manage in realtime.

Realtime Database => A Tree of Values

With just a single API, the Firebase database provides your app
with both the current value of the data and any updates to that
data.
Realtime syncing makes it easy for your users to access their data
from any device, be it web or mobile. Realtime Database also helps
your users collaborate with one another.

Another amazing benefit of Realtime Database is that it ships with


mobile and web SDKs, allowing you to build your apps without the
need for servers.

When your users go offline, the Realtime Database SDKs use local
cache on the device to serve and store changes. When the device
comes online, the local data is automatically synchronized.

The Realtime Database can also integrate with Firebase


Authentication to provide a simple and intuitive authentication
process.

Authentication
Firebase Authentication provides backend services, easy-to-use
SDKs, and ready-made UI libraries to authenticate users to your
app.

Normally, it would take you months to set up your own


authentication system. And even after that, you would need to
keep a dedicated team to maintain that system. But if you use
Firebase, you can set up the entire system in under 10 lines of code
that will handle everything for you, including complex operations
like account merging.

You can authenticate your app’s users through the following


methods:

 Email & Password

 Phone numbers

 Google

 Facebook
 Twitter

 & more!

Using Firebase Authentication makes building secure


authentication systems easier, while also improving the sign-in
and onboarding experience for end users.

Firebase Authentication is built by the same people who created


Google Sign-in, Smart Lock, and Chrome Password Manager.

Firebase Cloud Messaging (FCM)


Firebase Cloud Messaging (FCM) provides a reliable and battery-
efficient connection between your server and devices that allows
you to deliver and receive messages and notifications on iOS,
Android, and the web at no cost.

You can send notification messages (2KB limit) and data messages
(4KB limit).

Using FCM, you can easily target messages using predefined


segments or create your own, using demographics and behavior.
You can send messages to a group of devices that are subscribed to
specific topics, or you can get as granular as a single device.

FCM can deliver messages instantly, or at a future time in the


user’s local time zone. You can send custom app data like setting
priorities, sounds, and expiration dates, and also track custom
conversion events.

The best thing about FCM is that there is hardly any coding
involved! FCM is completely integrated with Firebase Analytics,
giving you detailed engagement and conversion tracking.
You can also use A/B testing to try out different versions of your
notification messages, and then select the one which performs best
against your goals.

Firebase Database Query


Firebase has simplified the process of retrieving specific data from
the database through queries. Queries are created by chaining
together one or more filter methods.

Firebase has 4 ordering functions:

 orderByKey()

 orderByChild(‘child’)

 orderByValue()

 orderByPriority()

Firebase Test Labs


Firebase Test Labs provides a large number of mobile test devices
to help you test your apps.

Firebase Test Labs comes with 3 modes of testing:


Instrumentation Test
These are tests that you written specifically to test your app, using
frameworks like Espresso and UI Automator 2.0

 Robo Test

This test is for people who just want to relax and let Firebase
worry about tests. Firebase Test Labs can simulate user touch and
see how each component of the app functions.

 Game Loop Test

Test Labs support game app testing. It comes with a beta support
for using a “demo mode” where the game app runs while
simulating the actions of the player.

Remote Config
Remote config essentially allows us to publish updates to our users
immediately. Whether we wish to change the color scheme for a
screen, the layout for a particular section in our app or show
promotional/seasonal options — this is completely doable using
the server side parameters without the need to publish a new
version.

Remote Config gives us the power to:

 Quickly and easily update our applications without the need


to publish a new build to the app/play store.

 Effortlessly set how a segment behaves or looks in our


application based on the user/device that is using it.
Firebase Dynamic Links
Deep links are URLs that take you to a content. Most web links are
deep links.

Firebase can now modify deep links into Dynamic Links! Dynamic
Links allow the user to directly come to a particular location in
your app.

There are 3 fundamental uses for Dynamic Links

 Convert Mobile Web Users to Native App Users.

 Increase conversion for user-to-user sharing. By converting


your app’s users, when the app is shared with other users you
can skip the generic message which is shown when a user
downloads it from the store. Instead, you can show them
personalised greeting message.
 Drive installs from the third party. You can use social media
networks, email, and SMS can be used to increase your target
audience. When users install the app, they can see the exact
content of your campaigns.
Firestore

Cloud Firestore is a NoSQL document database that lets you easily


store, sync, and query data for your mobile and web apps — at a
global scale.

Though this may sound like something similar to the Realtime


Database, Firestore brings many new things to the platform that
makes it into something completely different from Realtime
Database.

Adafruit
Adafruit IO HTTP API provides excess to your Adafruit IO data from any programming
language or hardware environment that can speak Adafruit HTTP. The easiest way to get
started is with an adafruit learning guide and a simple internet of things capable device
like the Feather Huzzah or a more complicated one like the Pyportal.

Authentication:

Your adafruit IO is used to restrict or grant access to your data. The key is unique and
covers every use of the adafruit IO API for your account. You can access any key on your
dashboard by clicking on the golden key icon
Or by clicking on the “view AIO key” link in the sidebar while you are visiting adafruit IO.

Now you can copy the key directly from the information from that pop-up, or copy one of
the code samples that includes your username and key together.
Including an adafruit IO key
When making HTTP requests to adafruit IO, you can include the API key as a query
parameter named x-aio-key or a request header named X-AIO-Key. In both cases “X-
AIO-Key” is case insensitive

Note:

If you regerate your AIO key, your old key will be immediately invalidated, so you will
have to replace it in any scripts or sketches where it is in use.
Client Libraries
We have iots of client libraries to help you get started with your project:

 Arduino C++

 CircuitPython

 Python

 Ruby

Note:

The following two libraries use V1 of the adafruit API which have been deprecated

 Node.js

 Go

Rate Limiting

Adafruit IO imposes a rate limit on all data modification APIs to prevent


excessive load on the service. If a user perform too many data, create,
upate, or delete actions on a short period of time then the system start
rejecting requests.

If you have a free adafruit IO account, the rate limit is 30 data points per
limit.

If you
have upgr
aded to
an
Adafruit
IO Plus
account,
the base
rate limit
is 60 data
points
per
minute.
If you
exceed
this limit,
a notice
will be
sent to
the {usern
ame}/thro
ttle MQT
T topic.
You can
subscribe
to the
topic if
you wish
to know
when the
Adafruit
IO rate
limit has
been
exceeded
for your
user
account.
This limit
applies to
all Data
record
modificat
ion action
s over the
HTTP and
MQTT
APIs, so if
you have
multiple
devices or
clients
publishin
g data, be
sure to
delay
their
updates
enough
that the
total rate
is below
your
account
limit.

One data
record
modificat
ion is any
action
that
creates,
updates,
or deletes
a single
Data
record.

Pagi
natio
n

Adafruit
IO’s API
returns at
most
1000 data
points at
a time. To
get more
data if
your feed
is over
1000 data
points,
you’ll
need to
“paginate
” the data.
What
does this
mean?

When you
perform a
n HTTP
data GET
qbuery,
the results
are always
sorted
newest-
to-oldest
and
include
5 X-
Paginatio
n-* heade
rs and the
Link
header
field in
the
response.
You can
see an
example
of the
headers
on the
right.

Powerful API

The same API that drives our user interface is available to you. We provide
documentation so you can build a library in your favorite language to talk
to IO, or use one of ours.
It's Your Data

The data you store with IO is yours to manage and control. You can
download it all anytime and we will never sell or give it away to another
company. We feel strongly enough about this that we put it in our IoT Bill
of Rights.

Beautiful Dashboards

Data won't help you make better decisions or understand the world you're
living in unless you can see it. Charts, graphs, gauges, logging, and more
are availble from anywhere in our carefully designed web-based
dashboards.

Private & Secure

We won't share your account information with anyone without your


permission and everything you store on Adafruit IO is private by default,
whether you're a paying customer or not.

Documentation

We've written a lot more about Adafruit IO than just our web API. Teaching
is at the heart of Adafruit, and our Learning Systemhas all the projects
and guides you need to get started or to level up!

Triggers

Keep yourself and your systems up to date by automatically responding to


changes. Triggers monitor your data to notify you when your temperature
sensor gets too hot or when your DIY security system goes offline.

Hardware

We have been building Internet of Things devices and kits since long
before Adafruit IO ever existed. Start your project with the right
equipment or pick up the one last thing you need to finish. We've got
hardware for all types of makers.

Amazing Community
We Love Makers! Join us on the forums, on our Discord chat server, stop
by the weekly Show and Tell live stream to share your project,
and subscribe to our YouTube channel to see what we're up to.

IFTTT Applets
If This Then That, also known as IFTTT (/ɪft/),[7] is a free web-based service to create chains of
simple conditional statements, called applets.
An applet is triggered by changes that occur within other web services such
as Gmail, Facebook, Telegram, Instagram, or Pinterest.[8]
For example, an applet may send an e-mail message if the user tweets using a hashtag, or copy a
photo on Facebook to a user's archive if someone tags a user in a photo. [9]
In addition to the web-based application, the service runs on iOS and Android. In February 2015,
IFTTT renamed its original application to IF, and released a new suite of apps called Do, which lets
users create shortcut applications and actions.[10] As of 2015, IFTTT users created about 20 million
recipes each day.[11] All of the functionalities of the Do suite of apps have since been integrated into a
redesigned IFTTT app.

Overview[edit]

Screenshot of the IFTTT website

IFTTT employs the following concepts:

 Services (formerly known as channels) are the basic building blocks of IFTTT. [23] They mainly
describe a series of data from a certain web service such as YouTube or eBay. Services can
also describe actions controlled with certain APIs, like SMS. Sometimes, they can represent
information in terms of weather or stocks.[24] Each service has a particular set of triggers and
actions.[25]

 Triggers are the "this" part of an applet. They are the items that trigger the action. For
example, from an RSS feed, you can receive a notification based on a keyword or phrase.[9]

 Actions are the "that" part of an applet. They are the output that results from the input of the
trigger.

 Applets (formerly known as recipes) are the predicates made from Triggers and Actions. For
example, if you like a picture on Instagram (trigger), an IFTTT app can send the photo to
your Dropbox account (action).[23]

 Ingredients are basic data available from a trigger—from the email trigger, for example;
subject, body, attachment, received date, and sender’s address.[23]
Usage examples[edit]
 IFTTT can automate web-application tasks, such as posting the same content on several
social networks.

 Marketing professionals can use IFTTT to track mentions of companies in RSS feeds.[26]

 IFTTT also is used in home automation, for instance switching on a light when detecting
motion in a room (with associated compliant devices).[16]

1.1 What is IFTTT Anyway?


IFTTT is an automation service that will enable you to connect services so
that, when something happens with one service, a trigger goes off and an
action takes place automatically on the other.

For example: let’s say that you are a photography fan who uses
Instagram constantly throughout the day. You love taking photos with your
mobile device, touching them up and sharing them for everyone to see. Your
followers seem to love the photos, so you think that maybe you’d like to get
a bit more serious about this whole photography endeavor.

1.2 Why Should I Use IFTTT?


Most people nowadays spend hours in front of the computer for myriad
reasons. Some of them like to watch videos, download music, read useful
articles and do other fun activities. At the same time, using the Internet has
increasingly become a part of the average person’s work life.

Whatever the case may be for you, you will eventually ask yourself if there’s
a way to do the more repetitive tasks automatically. This is where IFTTT
comes into play. Using the tools laid out in this guide, you’ll be able to save
enormous amounts of precious time that you can use as you see fit later on.
If you’re an iOS user, you can also get robust automation tools using
iPhone Shortcuts.

How to Automate Microsoft Office Tasks with IFTTT Recipes

Applet #1 – Instagram Automatic Backup to


Dropbox

The example: Imagine that you’re walking near a park. All of a sudden you
spot a potential photography idea right in front of you. What do you do? You
take out your mobile device, shoot with your Instagram app and use IFTTT to
automatically save the shot to your Dropbox account. No manual selecting
and manual uploading. Create beautiful images — IFTTT will take care of the
upload in the background so that they are accessible on your computer later.
Android studio
Android Studio is the official[7] integrated development environment (IDE)
for Google's Android operating system, built on JetBrains' IntelliJ IDEA software and designed
specifically for Android development.[8] It is available for download
on Windows, macOS and Linux based operating systems.[9][10] It is a replacement for the Eclipse
Android Development Tools (ADT) as the primary IDE for native Android application development.
Android Studio was announced on May 16, 2013 at the Google I/O conference. It was in early
access preview stage starting from version 0.1 in May 2013, then entered beta stage starting from
version 0.8 which was released in June 2014.[11] The first stable build was released in December
2014, starting from version 1.0.[12]
Since 7 May 2019, Kotlin is Google’s preferred language for Android app development.[13] Still, other
languages are supported, including by Android Studio.

Features[edit]
The following features are provided in the current stable version:[14][15]

 Gradle-based build support

 Android-specific refactoring and quick fixes

 Lint tools to catch performance, usability, version compatibility and other problems

 ProGuard integration and app-signing capabilities

 Template-based wizards to create common Android designs and components

 A rich layout editor that allows users to drag-and-drop UI components, option to preview
layouts on multiple screen configurations[16]

 Support for building Android Wear apps

 Built-in support for Google Cloud Platform, enabling integration with Firebase Cloud
Messaging (Earlier 'Google Cloud Messaging') and Google App Engine[17]

 Android Virtual Device (Emulator) to run and debug apps in the Android studio.

Android studio
Android Studio is the official Integrated Development Environment (IDE) for Android app
development, based onIntelliJ IDEA . On top of IntelliJ's powerful code editor and
developer tools, Android Studio offers even more features that enhance your
productivity when building Android apps, such as:

 A flexible Gradle-based build system


 A fast and feature-rich emulator
 A unified environment where you can develop for all Android devices
 Instant Run to push changes to your running app without building a new APK
 Code templates and GitHub integration to help you build common app features and
import sample code
 Extensive testing tools and frameworks
 Lint tools to catch performance, usability, version compatibility, and other problems
 C++ and NDK support
 Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud
Messaging and App Engine

This page provides an introduction to basic Android Studio features. For a summary of
the latest changes, seeAndroid Studio release notes.
Project structure

Figure 1. The project files in Android view.

Each project in Android Studio contains one or more modules with source code files and
resource files. Types of modules include:

 Android app modules


 Library modules
 Google App Engine modules

By default, Android Studio displays your project files in the Android project view, as
shown in figure 1. This view is organized by modules to provide quick access to your
project's key source files.
All the build files are visible at the top level under Gradle Scriptsand each app module
contains the following folders:

 manifests: Contains the AndroidManifest.xml file.

 java: Contains the Java source code files, including JUnit test code.
 res: Contains all non-code resources, such as XML layouts, UI strings, and bitmap
images.

The Android project structure on disk differs from this flattened representation. To see
the actual file structure of the project, select Project from the Project dropdown (in
figure 1, it's showing as Android).

You can also customize the view of the project files to focus on specific aspects of your
app development. For example, selecting the Problems view of your project displays
links to the source files containing any recognized coding and syntax errors, such as a
missing XML element closing tag in a layout file.

Figure 2. The project files in Problems view, showing a layout file with a problem.

The User Interface


1. The toolbar lets you carry out a wide range of actions, including running your
app and launching Android tools.
2. The navigation bar helps you navigate through your project and open files for
editing. It provides a more compact view of the structure visible in
the Project window.
3. The editor window is where you create and modify code. Depending on the
current file type, the editor can change. For example, when viewing a layout file, the
editor displays the Layout Editor.
4. The tool window bar runs around the outside of the IDE window and contains
the buttons that allow you to expand or collapse individual tool windows.
5. The tool windows give you access to specific tasks like project management,
search, version control, and more. You can expand them and collapse them.
6. The status bar displays the status of your project and the IDE itself, as well as
any warnings or messages.

You can organize the main window to give yourself more screen space by hiding or
moving toolbars and tool windows. You can also use keyboard shortcuts to access most
IDE features.

At any time, you can search across your source code, databases, actions, elements of
the user interface, and so on, by double-pressing the Shift key, or clicking the
magnifying glass in the upper right-hand corner of the Android Studio window. This can
be very useful if, for example, you are trying to locate a particular IDE action that you
have forgotten how to trigger.

Tool windows
Instead of using preset perspectives, Android Studio follows your context and
automatically brings up relevant tool windows as you work. By default, the most
commonly used tool windows are pinned to the tool window bar at the edges of the
application window.

 To expand or collapse a tool window, click the tool’s name in the tool window bar. You
can also drag, pin, unpin, attach, and detach tool windows.
 To return to the current default tool window layout, click Window > Restore Default
Layout or customize your default layout by clicking Window > Store Current Layout as
Default.

 To show or hide the entire tool window bar, click the window icon in the bottom left-
hand corner of the Android Studio window.
 To locate a specific tool window, hover over the window icon and select the tool window
from the menu.

You can also use keyboard shortcuts to open tool windows. Table 1 lists the shortcuts
for the most common windows.

Table 1. Keyboard shortcuts for some useful tool windows.

Tool window Windows and Linux Mac

Project Alt+1 Command+1

Version Control Alt+9 Command+9


Run Shift+F10 Control+R

Debug Shift+F9 Control+D

Logcat Alt+6 Command+6

Return to Editor Esc Esc

Hide All Tool Windows Control+Shift+F12 Command+Shift+F12

If you want to hide all toolbars, tool windows, and editor tabs, click View > Enter
Distraction Free Mode. This enables Distraction Free Mode. To exit Distraction Free
Mode, click View > Exit Distraction Free Mode.

You can use Speed Search to search and filter within most tool windows in Android
Studio. To use Speed Search, select the tool window and then type your search query.

For more tips, see Keyboard shortcuts.

Code completion
Android Studio has three types of code completion, which you can access using
keyboard shortcuts.

Table 2. Keyboard shortcuts for code completion.

Type Description Windows and Linux Mac

Basic Displays basic suggestions for variables, types, methods, Control+Space Control+Spac
Completion expressions, and so on. If you call basic completion twice in
a row, you see more results, including private members and
non-imported static members.
Smart Displays relevant options based on the context. Smart Control+Shift+Spac Control+Shift
Completion completion is aware of the expected type and data flows. If e
you call Smart Completion twice in a row, you see more
results, including chains.

Statement Completes the current statement for you, adding missing Control+Shift+Enter Shift+Comma
Completion parentheses, brackets, braces, formatting, etc.

You can also perform quick fixes and show intention actions by pressing Alt+Enter.

You might also like