Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
50
Build_your_First_App_with_Flutter.pdf
dhuma1981
1
440
Flutter: Makes developer’s life easy
dhuma1981
1
380
Flutter Theming & Animation
dhuma1981
1
320
Let's explore Flutter with Firebase
dhuma1981
0
640
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
360
Other Decks in Programming
See All in Programming
愛される翻訳の秘訣
kishikawakatsumi
3
340
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
460
C-Shared Buildで突破するAI Agent バックテストの壁
po3rin
0
410
公共交通オープンデータ × モバイルUX 複雑な運行情報を 『直感』に変換する技術
tinykitten
PRO
0
160
AIコーディングエージェント(NotebookLM)
kondai24
0
220
ローカルLLMを⽤いてコード補完を⾏う VSCode拡張機能を作ってみた
nearme_tech
PRO
0
140
ZJIT: The Ruby 4 JIT Compiler / Ruby Release 30th Anniversary Party
k0kubun
0
250
Navigating Dependency Injection with Metro
l2hyunwoo
1
170
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
8
2.5k
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
250
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
クラウドに依存しないS3を使った開発術
simesaba80
0
150
Featured
See All Featured
A designer walks into a library…
pauljervisheath
210
24k
So, you think you're a good person
axbom
PRO
0
1.8k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
170
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
51
The World Runs on Bad Software
bkeepers
PRO
72
12k
Docker and Python
trallard
47
3.7k
Between Models and Reality
mayunak
0
150
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
320
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
180
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
GitHub's CSS Performance
jonrohan
1032
470k
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