SlideShare uma empresa Scribd logo
1 de 18
Post IO Meetup
Introduction to Firebase
Amrit Sanjeev
Organizer, Blrdroid
Who am I ?
What is firebase
Realtime Database User Management Hosting
Realtime Application Platform
Real time database
● NoSQL, JSON database
● Maps each piece of data to a URL
● Pushes updates in milliseconds
when things change
● seemless offline support
● automatic sync on network
acccess
Offline support
● Automatically syncs to
the server and pushes
to other devices when
network comes back
Offline support
Drop-in support for login with
● Email & Password
● Common OAuth providers
○ Google
○ Facebook
○ Twitter
○ Github
● Your own custom auth tokens
Auth and user management
Static hosting
Production grade static-asset hosting service
● SSL Certificate included!
● Backed by a global CDN
● Launch with: firebase deploy
● One click rollbacks from our dashboard
Security Considerations
● Namespace sandboxing
● HTTPS + 2048-bit SSL
● BCrypt for passwords (not stored directly in the
Firebase)
● Security rules stored and executed server side
Reliability and Data retention
● SLA is 99.95%
● Check on status.firebase.com
● Consistency model guarantees write persistence
● Three tiered backups, every 24 hours
● Private customer backup to GCS/S3
Now let’s find out
how much code it is to
implement
Add firebase support
In build.gradle
dependencies {
compile 'com.firebase:firebase-client-android:2.3.0+'
}
In Android manifest
<uses-permission android:name="android.permission.INTERNET" />
In Android application or activity
@Override
public void onCreate() {
super.onCreate();
Firebase.setAndroidContext(this);
}
Data store
Creating a reference
Firebase rootRef = new Firebase("https://docs-examples.firebaseio.com/web/data");
Directly access child nodes in the data
Firebase rootRef = new Firebase("https://docs-examples.firebaseio.com/web/data/users/mchen/name");
Using the Child() api call
Firebase rootRef = new Firebase("https://docs-examples.firebaseio.com/web/data");
rootRef.child("users/mchen/name");
● setValue( ) Write or replace data to a defined path, like messages/users/<username>
● updateChildren( ) Update some of the keys for a defined path without replacing all of the data
● push( ) Add to a list of data in your Firebase database.
● runTransaction( ) Use our transactions feature when working with complex data
Firebase usersRef = ref.child("users");
Map<String, User> users = new HashMap<String, User>();
users.put("alanisawesome", alanisawesome);
users.put("gracehop", gracehop);
usersRef.setValue(users);
Saving data
Retrieving data
● Attach an asynchronous listener to a Firebase reference.
● The listener will be triggered
○ once for the initial state of the data
○ again anytime the data changes
Firebase ref = new Firebase("https://docs-examples.firebaseio.com/web/saving-data/fireblog/posts");
ref.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot snapshot) {
System.out.println(snapshot.getValue());
}
@Override
public void onCancelled(FirebaseError firebaseError) {
System.out.println("The read failed: " + firebaseError.getMessage());
}
});
Offline support
Adding offline support
Firebase.getDefaultConfig().setPersistenceEnabled(true);
Keeping data refresh
Firebase scoresRef = new Firebase("https://dinosaur-facts.firebaseio.com/scores");
scoresRef.keepSynced(true);
Thank you!
Amrit Sanjeev
@amsanjeev
www.blrdroid.org

Mais conteúdo relacionado

Mais procurados

Introduction, Examples - Firebase
Introduction, Examples - Firebase Introduction, Examples - Firebase
Introduction, Examples - Firebase Eueung Mulyana
 
Intro firebase
Intro firebaseIntro firebase
Intro firebaseMandy Pao
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Sittiphol Phanvilai
 
Getting Started with Firebase Cloud Functions
Getting Started with Firebase Cloud FunctionsGetting Started with Firebase Cloud Functions
Getting Started with Firebase Cloud FunctionsMuhammad Samu
 
How to build Android Chat App with Firebase for 2 hours?
How to build Android Chat App with Firebase for 2 hours?How to build Android Chat App with Firebase for 2 hours?
How to build Android Chat App with Firebase for 2 hours?Nguyễn Bá Thành
 
Firebase - realtime backend for mobile app and IoT
Firebase - realtime backend for mobile app and IoTFirebase - realtime backend for mobile app and IoT
Firebase - realtime backend for mobile app and IoTAndri Yadi
 
Introducing firebase
Introducing firebaseIntroducing firebase
Introducing firebaseFarouk Touzi
 
Building Extraordinary Apps with Firebase Analytics
Building Extraordinary Apps with Firebase AnalyticsBuilding Extraordinary Apps with Firebase Analytics
Building Extraordinary Apps with Firebase AnalyticsGDG Korea
 
Firebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech StaffFirebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech StaffTharaka Devinda
 
What is new in Firebase?
What is new in Firebase?What is new in Firebase?
What is new in Firebase?Sinan Yılmaz
 
Online mobile game server use Firebase realtime aatabase
Online mobile game server use Firebase realtime aatabaseOnline mobile game server use Firebase realtime aatabase
Online mobile game server use Firebase realtime aatabaseNguyễn Bá Thành
 
Firebase for the Web
Firebase for the WebFirebase for the Web
Firebase for the WebJana Moudrá
 
Firebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeFirebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeJuarez Filho
 
The Firebase tier for your mobile app - DevFest CH
The Firebase tier for your mobile app - DevFest CHThe Firebase tier for your mobile app - DevFest CH
The Firebase tier for your mobile app - DevFest CHMatteo Bonifazi
 
What's New with Confluence Connect
What's New with Confluence ConnectWhat's New with Confluence Connect
What's New with Confluence ConnectAtlassian
 
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfO365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfNCCOMMS
 

Mais procurados (20)

Introduction, Examples - Firebase
Introduction, Examples - Firebase Introduction, Examples - Firebase
Introduction, Examples - Firebase
 
Intro firebase
Intro firebaseIntro firebase
Intro firebase
 
Firebase
FirebaseFirebase
Firebase
 
Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]Introduction to Firebase [Google I/O Extended Bangkok 2016]
Introduction to Firebase [Google I/O Extended Bangkok 2016]
 
Getting Started with Firebase Cloud Functions
Getting Started with Firebase Cloud FunctionsGetting Started with Firebase Cloud Functions
Getting Started with Firebase Cloud Functions
 
How to build Android Chat App with Firebase for 2 hours?
How to build Android Chat App with Firebase for 2 hours?How to build Android Chat App with Firebase for 2 hours?
How to build Android Chat App with Firebase for 2 hours?
 
Firebase - realtime backend for mobile app and IoT
Firebase - realtime backend for mobile app and IoTFirebase - realtime backend for mobile app and IoT
Firebase - realtime backend for mobile app and IoT
 
Introducing firebase
Introducing firebaseIntroducing firebase
Introducing firebase
 
Building Extraordinary Apps with Firebase Analytics
Building Extraordinary Apps with Firebase AnalyticsBuilding Extraordinary Apps with Firebase Analytics
Building Extraordinary Apps with Firebase Analytics
 
Firebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech StaffFirebase Basics - Dialog Demo for Group Tech Staff
Firebase Basics - Dialog Demo for Group Tech Staff
 
What is new in Firebase?
What is new in Firebase?What is new in Firebase?
What is new in Firebase?
 
Online mobile game server use Firebase realtime aatabase
Online mobile game server use Firebase realtime aatabaseOnline mobile game server use Firebase realtime aatabase
Online mobile game server use Firebase realtime aatabase
 
Introducing Firebase by Google
Introducing Firebase by GoogleIntroducing Firebase by Google
Introducing Firebase by Google
 
Firebase for the Web
Firebase for the WebFirebase for the Web
Firebase for the Web
 
Firebase
FirebaseFirebase
Firebase
 
Firebase
FirebaseFirebase
Firebase
 
Firebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in RealtimeFirebase Adventures - Going above and beyond in Realtime
Firebase Adventures - Going above and beyond in Realtime
 
The Firebase tier for your mobile app - DevFest CH
The Firebase tier for your mobile app - DevFest CHThe Firebase tier for your mobile app - DevFest CH
The Firebase tier for your mobile app - DevFest CH
 
What's New with Confluence Connect
What's New with Confluence ConnectWhat's New with Confluence Connect
What's New with Confluence Connect
 
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio StruyfO365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
O365Con18 - Automate your Tasks through Azure Functions - Elio Struyf
 

Semelhante a Introduction to Firebase on Android

Firebase-ized your mobile app
Firebase-ized  your mobile appFirebase-ized  your mobile app
Firebase-ized your mobile appMatteo Bonifazi
 
Angular 4 with firebase
Angular 4 with firebaseAngular 4 with firebase
Angular 4 with firebaseAnne Bougie
 
Database, data storage, hosting with Firebase
Database, data storage, hosting with FirebaseDatabase, data storage, hosting with Firebase
Database, data storage, hosting with FirebaseTu Pham
 
Lecture 11 Firebase overview
Lecture 11 Firebase overviewLecture 11 Firebase overview
Lecture 11 Firebase overviewMaksym Davydov
 
Firestore MENA digital days : GDG Abu dhabi
Firestore MENA digital days : GDG Abu dhabiFirestore MENA digital days : GDG Abu dhabi
Firestore MENA digital days : GDG Abu dhabiShashank Kakroo
 
Intro to Firebase || Event by DSC UNIDEB
Intro to Firebase || Event by DSC UNIDEBIntro to Firebase || Event by DSC UNIDEB
Intro to Firebase || Event by DSC UNIDEBMuhammad Raza
 
Building an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseBuilding an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseMarina Coelho
 
Lessons learned using Firebase in Production
Lessons learned using Firebase in ProductionLessons learned using Firebase in Production
Lessons learned using Firebase in ProductionMaik Buchmeyer
 
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Codemotion
 
Firebase on Android: The Big Picture
Firebase on Android: The Big PictureFirebase on Android: The Big Picture
Firebase on Android: The Big PictureSriyank Siddhartha
 
JUDCon 2014: Gearing up for mobile development with AeroGear
JUDCon 2014: Gearing up for mobile development with AeroGearJUDCon 2014: Gearing up for mobile development with AeroGear
JUDCon 2014: Gearing up for mobile development with AeroGearprajods
 
Backbone Conf 2014 - Realtime & Firebase
Backbone Conf 2014 - Realtime & FirebaseBackbone Conf 2014 - Realtime & Firebase
Backbone Conf 2014 - Realtime & FirebaseClément Wehrung
 
Android writing and reading from firebase
Android writing and reading from firebaseAndroid writing and reading from firebase
Android writing and reading from firebaseOsahon Gino Ediagbonya
 
Mobile game architecture on GCP
Mobile game architecture on GCPMobile game architecture on GCP
Mobile game architecture on GCP명근 최
 
Mobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantMobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantIBM Cloud Data Services
 
Developing For Multiple Environments on SharePoint Online
Developing For Multiple Environments on SharePoint OnlineDeveloping For Multiple Environments on SharePoint Online
Developing For Multiple Environments on SharePoint OnlineFrank Sikorski
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5Darren Craig
 

Semelhante a Introduction to Firebase on Android (20)

Firebase-ized your mobile app
Firebase-ized  your mobile appFirebase-ized  your mobile app
Firebase-ized your mobile app
 
Angular 4 with firebase
Angular 4 with firebaseAngular 4 with firebase
Angular 4 with firebase
 
Google Firebase presentation - English
Google Firebase presentation - EnglishGoogle Firebase presentation - English
Google Firebase presentation - English
 
Firebase overview
Firebase overviewFirebase overview
Firebase overview
 
Database, data storage, hosting with Firebase
Database, data storage, hosting with FirebaseDatabase, data storage, hosting with Firebase
Database, data storage, hosting with Firebase
 
Lecture 11 Firebase overview
Lecture 11 Firebase overviewLecture 11 Firebase overview
Lecture 11 Firebase overview
 
Firebase
Firebase Firebase
Firebase
 
Firestore MENA digital days : GDG Abu dhabi
Firestore MENA digital days : GDG Abu dhabiFirestore MENA digital days : GDG Abu dhabi
Firestore MENA digital days : GDG Abu dhabi
 
Intro to Firebase || Event by DSC UNIDEB
Intro to Firebase || Event by DSC UNIDEBIntro to Firebase || Event by DSC UNIDEB
Intro to Firebase || Event by DSC UNIDEB
 
Building an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseBuilding an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and Firebase
 
Lessons learned using Firebase in Production
Lessons learned using Firebase in ProductionLessons learned using Firebase in Production
Lessons learned using Firebase in Production
 
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...
 
Firebase on Android: The Big Picture
Firebase on Android: The Big PictureFirebase on Android: The Big Picture
Firebase on Android: The Big Picture
 
JUDCon 2014: Gearing up for mobile development with AeroGear
JUDCon 2014: Gearing up for mobile development with AeroGearJUDCon 2014: Gearing up for mobile development with AeroGear
JUDCon 2014: Gearing up for mobile development with AeroGear
 
Backbone Conf 2014 - Realtime & Firebase
Backbone Conf 2014 - Realtime & FirebaseBackbone Conf 2014 - Realtime & Firebase
Backbone Conf 2014 - Realtime & Firebase
 
Android writing and reading from firebase
Android writing and reading from firebaseAndroid writing and reading from firebase
Android writing and reading from firebase
 
Mobile game architecture on GCP
Mobile game architecture on GCPMobile game architecture on GCP
Mobile game architecture on GCP
 
Mobile App Development With IBM Cloudant
Mobile App Development With IBM CloudantMobile App Development With IBM Cloudant
Mobile App Development With IBM Cloudant
 
Developing For Multiple Environments on SharePoint Online
Developing For Multiple Environments on SharePoint OnlineDeveloping For Multiple Environments on SharePoint Online
Developing For Multiple Environments on SharePoint Online
 
What's New In Laravel 5
What's New In Laravel 5What's New In Laravel 5
What's New In Laravel 5
 

Mais de amsanjeev

No sql databases blrdroid devfest 2016
No sql databases   blrdroid devfest 2016No sql databases   blrdroid devfest 2016
No sql databases blrdroid devfest 2016amsanjeev
 
Io13 deep dive location api
Io13 deep dive   location api Io13 deep dive   location api
Io13 deep dive location api amsanjeev
 
Jelly bean aka Andorid 4.1
Jelly bean aka Andorid 4.1Jelly bean aka Andorid 4.1
Jelly bean aka Andorid 4.1amsanjeev
 
Location Based Services - An Overview
Location Based Services - An Overview Location Based Services - An Overview
Location Based Services - An Overview amsanjeev
 
NFC - quick primer
NFC - quick primerNFC - quick primer
NFC - quick primeramsanjeev
 
Introduction to ICS
Introduction to ICSIntroduction to ICS
Introduction to ICSamsanjeev
 

Mais de amsanjeev (7)

No sql databases blrdroid devfest 2016
No sql databases   blrdroid devfest 2016No sql databases   blrdroid devfest 2016
No sql databases blrdroid devfest 2016
 
Io13 deep dive location api
Io13 deep dive   location api Io13 deep dive   location api
Io13 deep dive location api
 
Jelly bean aka Andorid 4.1
Jelly bean aka Andorid 4.1Jelly bean aka Andorid 4.1
Jelly bean aka Andorid 4.1
 
Mobile UX
Mobile UXMobile UX
Mobile UX
 
Location Based Services - An Overview
Location Based Services - An Overview Location Based Services - An Overview
Location Based Services - An Overview
 
NFC - quick primer
NFC - quick primerNFC - quick primer
NFC - quick primer
 
Introduction to ICS
Introduction to ICSIntroduction to ICS
Introduction to ICS
 

Último

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

Introduction to Firebase on Android

  • 1. Post IO Meetup Introduction to Firebase Amrit Sanjeev Organizer, Blrdroid
  • 3.
  • 4. What is firebase Realtime Database User Management Hosting Realtime Application Platform
  • 5. Real time database ● NoSQL, JSON database ● Maps each piece of data to a URL ● Pushes updates in milliseconds when things change
  • 6. ● seemless offline support ● automatic sync on network acccess Offline support
  • 7. ● Automatically syncs to the server and pushes to other devices when network comes back Offline support
  • 8. Drop-in support for login with ● Email & Password ● Common OAuth providers ○ Google ○ Facebook ○ Twitter ○ Github ● Your own custom auth tokens Auth and user management
  • 9. Static hosting Production grade static-asset hosting service ● SSL Certificate included! ● Backed by a global CDN ● Launch with: firebase deploy ● One click rollbacks from our dashboard
  • 10. Security Considerations ● Namespace sandboxing ● HTTPS + 2048-bit SSL ● BCrypt for passwords (not stored directly in the Firebase) ● Security rules stored and executed server side
  • 11. Reliability and Data retention ● SLA is 99.95% ● Check on status.firebase.com ● Consistency model guarantees write persistence ● Three tiered backups, every 24 hours ● Private customer backup to GCS/S3
  • 12. Now let’s find out how much code it is to implement
  • 13. Add firebase support In build.gradle dependencies { compile 'com.firebase:firebase-client-android:2.3.0+' } In Android manifest <uses-permission android:name="android.permission.INTERNET" /> In Android application or activity @Override public void onCreate() { super.onCreate(); Firebase.setAndroidContext(this); }
  • 14. Data store Creating a reference Firebase rootRef = new Firebase("https://docs-examples.firebaseio.com/web/data"); Directly access child nodes in the data Firebase rootRef = new Firebase("https://docs-examples.firebaseio.com/web/data/users/mchen/name"); Using the Child() api call Firebase rootRef = new Firebase("https://docs-examples.firebaseio.com/web/data"); rootRef.child("users/mchen/name");
  • 15. ● setValue( ) Write or replace data to a defined path, like messages/users/<username> ● updateChildren( ) Update some of the keys for a defined path without replacing all of the data ● push( ) Add to a list of data in your Firebase database. ● runTransaction( ) Use our transactions feature when working with complex data Firebase usersRef = ref.child("users"); Map<String, User> users = new HashMap<String, User>(); users.put("alanisawesome", alanisawesome); users.put("gracehop", gracehop); usersRef.setValue(users); Saving data
  • 16. Retrieving data ● Attach an asynchronous listener to a Firebase reference. ● The listener will be triggered ○ once for the initial state of the data ○ again anytime the data changes Firebase ref = new Firebase("https://docs-examples.firebaseio.com/web/saving-data/fireblog/posts"); ref.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(DataSnapshot snapshot) { System.out.println(snapshot.getValue()); } @Override public void onCancelled(FirebaseError firebaseError) { System.out.println("The read failed: " + firebaseError.getMessage()); } });
  • 17. Offline support Adding offline support Firebase.getDefaultConfig().setPersistenceEnabled(true); Keeping data refresh Firebase scoresRef = new Firebase("https://dinosaur-facts.firebaseio.com/scores"); scoresRef.keepSynced(true);