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
230
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
43
Build_your_First_App_with_Flutter.pdf
dhuma1981
1
430
Flutter: Makes developer’s life easy
dhuma1981
1
360
Flutter Theming & Animation
dhuma1981
1
310
Let's explore Flutter with Firebase
dhuma1981
0
630
Let's Start with Flutter
dhuma1981
4
400
What the Flutter?
dhuma1981
1
360
Let's Flirt with Flutter
dhuma1981
3
450
Quick Settings & Split Screen in Android N
dhuma1981
3
340
Other Decks in Programming
See All in Programming
RDoc meets YARD
okuramasafumi
4
160
時間軸から考えるTerraformを使う理由と留意点
fufuhu
14
4.3k
rage against annotate_predecessor
junk0612
0
160
TanStack DB ~状態管理の新しい考え方~
bmthd
2
480
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
420
react-callを使ってダイヤログをいろんなとこで再利用しよう!
shinaps
1
150
DockerからECSへ 〜 AWSの海に出る前に知っておきたいこと 〜
ota1022
5
1.9k
MLH State of the League: 2026 Season
theycallmeswift
0
220
Honoアップデート 2025年夏
yusukebe
1
910
「待たせ上手」なスケルトンスクリーン、 そのUXの裏側
teamlab
PRO
0
240
プロポーザル駆動学習 / Proposal-Driven Learning
mackey0225
2
790
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
200
Featured
See All Featured
Balancing Empowerment & Direction
lara
3
610
How to train your dragon (web standard)
notwaldorf
96
6.2k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
How to Ace a Technical Interview
jacobian
279
23k
Navigating Team Friction
lara
189
15k
The Art of Programming - Codeland 2020
erikaheidi
55
13k
It's Worth the Effort
3n
187
28k
Into the Great Unknown - MozCon
thekraken
40
2k
The Cost Of JavaScript in 2023
addyosmani
53
8.9k
Scaling GitHub
holman
463
140k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.2k
Writing Fast Ruby
sferik
628
62k
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