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
Utilise the power of AI with Flutter App Development
dhuma1981
0
6
Build_your_First_App_with_Flutter.pdf
dhuma1981
1
410
Flutter: Makes developer’s life easy
dhuma1981
1
310
Flutter Theming & Animation
dhuma1981
1
260
Let's explore Flutter with Firebase
dhuma1981
0
610
Let's Start with Flutter
dhuma1981
4
390
What the Flutter?
dhuma1981
1
350
Let's Flirt with Flutter
dhuma1981
3
440
Quick Settings & Split Screen in Android N
dhuma1981
3
290
Other Decks in Programming
See All in Programming
OSSで起業してもうすぐ10年 / Open Source Conference 2024 Shimane
furukawayasuto
0
110
subpath importsで始めるモック生活
10tera
0
300
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
610
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
エンジニアとして関わる要件と仕様(公開用)
murabayashi
0
290
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Webの技術スタックで マルチプラットフォームアプリ開発を可能にするElixirDesktopの紹介
thehaigo
2
1k
CSC509 Lecture 13
javiergs
PRO
0
110
Click-free releases & the making of a CLI app
oheyadam
2
120
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
Figma Dev Modeで変わる!Flutterの開発体験
watanave
0
130
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
GraphQLとの向き合い方2022年版
quramy
43
13k
A Tale of Four Properties
chriscoyier
156
23k
Site-Speed That Sticks
csswizardry
0
26
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
Music & Morning Musume
bryan
46
6.2k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
0
96
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Become a Pro
speakerdeck
PRO
25
5k
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