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
410
Flutter: Makes developer’s life easy
dhuma1981
1
300
Flutter Theming & Animation
dhuma1981
1
250
Let's explore Flutter with Firebase
dhuma1981
0
610
Let's Start with Flutter
dhuma1981
4
380
What the Flutter?
dhuma1981
1
350
Let's Flirt with Flutter
dhuma1981
3
440
Quick Settings & Split Screen in Android N
dhuma1981
3
280
Getting into REAL(M) business by dumping SQLite
dhuma1981
4
410
Other Decks in Programming
See All in Programming
REXML改善のその後
naitoh
0
190
Rechartsで楽にゴリゴリにカスタマイズする!
10tera
1
170
How to Break into Reading Open Source
kaspth
2
220
僕が思い描くTypeScriptの未来を勝手に先取りする
yukukotani
9
2.4k
Android開発以外のAndroid開発経験の活かしどころ
konifar
2
1k
AndroidアプリのUIバリエーションをあの手この手で確認する / Check UI variations of Android apps by various means
tkmnzm
1
170
Method Swizzlingを行うライブラリにおけるマルチモジュール設計
yoshikma
0
120
2024 컴포즈 정원사
jisungbin
0
150
Hono・Prisma・AWSでGeoなAPI開発
nokonoko1203
5
680
メモリ最適化を究める!iOSアプリ開発における5つの重要なポイント
yhirakawa333
0
420
A New Era of Testing
mannodermaus
2
510
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
250
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
36
7k
Statistics for Hackers
jakevdp
794
220k
Six Lessons from altMBA
skipperchong
26
3.4k
Build your cross-platform service in a week with App Engine
jlugia
228
18k
Building Applications with DynamoDB
mza
90
6k
Unsuck your backbone
ammeep
667
57k
Rebuilding a faster, lazier Slack
samanthasiow
78
8.6k
How To Stay Up To Date on Web Technology
chriscoyier
786
250k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
230
17k
Producing Creativity
orderedlist
PRO
340
39k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Robots, Beer and Maslow
schacon
PRO
157
8.2k
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