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
46
Build_your_First_App_with_Flutter.pdf
dhuma1981
1
430
Flutter: Makes developer’s life easy
dhuma1981
1
370
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
350
Other Decks in Programming
See All in Programming
All(?) About Point Sets
hole
0
150
仕様がそのままテストになる!Javaで始める振る舞い駆動開発
ohmori_yusuke
8
4.4k
Core MIDI を勉強して作曲用の電子ピアノ作ってみた!
hypebeans
0
110
Java_プロセスのメモリ監視の落とし穴_NMT_で見抜けない_glibc_キャッシュ問題_.pdf
ntt_dsol_java
0
200
Flutterチームから作る組織の越境文化
findy_eventslides
0
110
モビリティSaaSにおけるデータ利活用の発展
nealle
0
450
Nitro v3
kazupon
2
310
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
2
530
AIを駆使して新しい技術を効率的に理解する方法
nogu66
1
630
CloudNative Days Winter 2025: 一週間で作る低レイヤコンテナランタイム
ternbusty
6
1.3k
AI駆動開発ライフサイクル(AI-DLC)のホワイトペーパーを解説
swxhariu5
0
1k
「正規表現をつくる」をつくる / make "make regex"
makenowjust
1
470
Featured
See All Featured
BBQ
matthewcrist
89
9.9k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
GraphQLとの向き合い方2022年版
quramy
49
14k
Into the Great Unknown - MozCon
thekraken
40
2.2k
Agile that works and the tools we love
rasmusluckow
331
21k
4 Signs Your Business is Dying
shpigford
186
22k
Music & Morning Musume
bryan
46
6.9k
Gamification - CAS2011
davidbonilla
81
5.5k
[RailsConf 2023] Rails as a piece of cake
palkan
57
6.1k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Faster Mobile Websites
deanohume
310
31k
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