Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Firebase for Android
Search
Dhrumil Shah
November 02, 2015
Programming
3
220
Firebase for Android
Basic introduction about Firebase and how easy it is to use for Android.
Dhrumil Shah
November 02, 2015
Tweet
Share
More Decks by Dhrumil Shah
See All by Dhrumil Shah
Build_your_First_App_with_Flutter.pdf
dhuma1981
1
400
Flutter: Makes developer’s life easy
dhuma1981
1
260
Flutter Theming & Animation
dhuma1981
1
200
Let's explore Flutter with Firebase
dhuma1981
0
600
Let's Start with Flutter
dhuma1981
4
380
What the Flutter?
dhuma1981
1
340
Let's Flirt with Flutter
dhuma1981
3
440
Quick Settings & Split Screen in Android N
dhuma1981
3
270
Getting into REAL(M) business by dumping SQLite
dhuma1981
4
400
Other Decks in Programming
See All in Programming
サイコロで理解する統計的仮説検定の考え方
tatamiya
4
890
Ruby Pattern Matching
bkuhlmann
0
920
ScalarDBを用いたマイクロサービスにおけるデータ管理 (Database Engineering Meetup #2)
scalar
0
110
MicrosoftのPlatform Engineeringガイドを読んで実際になにかやってみた
ymd65536
1
290
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
360
Komplexe Oberflächen mit SVG und der Web Animation API
joergneumann
0
670
Zero Waste, Radical Magic, and Italian Graft – Quarkus Efficiency Secrets
hollycummins
0
230
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
160
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
100
Goのエラースタックトレースの歴史と今後
sonatard
7
1.1k
Git Lint
bkuhlmann
4
750
Rethinking UI building strategies @ SFI 2024
letelete
0
270
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
6
1.5k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
19
1.7k
Optimising Largest Contentful Paint
csswizardry
8
2.4k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
What the flash - Photography Introduction
edds
64
11k
Testing 201, or: Great Expectations
jmmastey
28
6.3k
The Invisible Side of Design
smashingmag
294
49k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Embracing the Ebb and Flow
colly
80
4.1k
Rails Girls Zürich Keynote
gr2m
91
13k
Transcript
FIREBASE for ANDROID By: Dhrumil Shah
The Realtime Backend for your App
Creating an app shouldn’t require managing complex infrastructure.
THE FULL STACK
The full stack is never really that simple
… and neither is the client side
The user doesn’t care about your backend
THE USER EXPECTS Speed Offline Multi-platform Simple Authentication
FIREBASE The Realtime Backend for your App
THE FIREBASE BACKEND
None
CLOUD DATABASE NoSQL data-store Returns JSON from a RESTful API
None
REALTIME DATA Whenever data is updated in Firebase, it sends
the update down to every listening client
None
STORE DATA Firebase ref = new Firebase("https://<your-firebase-app>.firebaseio.com/message"); ref.setValue("All the things");
SYNC DATA Firebase ref = new Firebase("https://<your-firebase-app>.firebaseio.com/message"); ref.addValueEventListener(new ValueEventListener() {
@Override public void onDataChange(DataSnapshot snapshot) { System.out.println(snapshot.getValue()); } @Override public void onCancelled(FirebaseError error) { } });
OFFLINE
INTERMITTENT OFFLINE What happens when you go through a tunnel?
Firebase clients store a local cache of your data. When the user goes offline, the app still works as expected with the local cache.
ENTENDED OFFLINE What happens when you go on a flight?
On mobile, Firebase persists data to a local store. The app will continue to work even across app restarts.
ONE LINE OF CODE Firebase.getDefaultConfig().setPersistenceEnabled(true);
None
Firebase supports several forms of authentication Email & Password Google
Twitter Facebook Github Anonymous … and even custom backends
AUTHENTICATION ref.authWithOAuthToken("google", "<OAuth Token>", new Firebase. AuthResultHandler() { @Override public
void onAuthenticated(AuthData authData) { // the Google user is now authenticated with your Firebase app } @Override public void onAuthenticationError(FirebaseError firebaseError) { // there was an error } });
None
SECURITY By default everyone can read and write { "rules":
{ ".read": true, ".write": true, } }
SECURITY Everyone can read, but no one can write {
"rules": { ".read": true, ".write": false, } }
SECURITY Secure specific parts of your firebase { "rules": {
".read": true, “message”: { ".write": false, } } }
WELL DOCUMENTED
FIREBASE META-DATA 276,348 registered developers 1M concurrent users on Firebase
sites Joined Google October, 2014
FOCUS ON YOUR APP The user doesn’t care about the
backend What matters is that your app is fast and enjoyable
QUESTIONS ?? http://www.dhuma1981.in
None