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
Introduction to Firebase Notifications
Search
Daichi Furiya (Wasabeef)
June 10, 2016
Programming
1
1.3k
Introduction to Firebase Notifications
Introduction to Firebase Notifications
Daichi Furiya (Wasabeef)
June 10, 2016
Tweet
Share
More Decks by Daichi Furiya (Wasabeef)
See All by Daichi Furiya (Wasabeef)
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
5
1.4k
About Flutter Architecture
wasabeef
1
200
2023 Flutter/Dart Summary
wasabeef
0
57
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
160
I/O Extended 2023 - Flutter 活用事例
wasabeef
10
2.9k
What it Takes to be a Flutter Developer
wasabeef
0
180
FlutterKaigi 2022 Keynote
wasabeef
1
580
Flutter Hooks を使ったアプリ開発 / App Development with the Flutter Hooks
wasabeef
2
1.4k
Flutter 2021 の振り返りと今後のアプリ開発に向けて / Looking back on Flutter 2021 and for future app development.
wasabeef
4
2.1k
Other Decks in Programming
See All in Programming
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
color-scheme: light dark; を完全に理解する
uhyo
7
500
sappoRo.R #12 初心者セッション
kosugitti
0
280
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
41
16k
もう少しテストを書きたいんじゃ〜 #phpstudy
o0h
PRO
19
4.1k
Unity Android XR入門
sakutama_11
0
180
Jakarta EE meets AI
ivargrimstad
0
520
Honoをフロントエンドで使う 3つのやり方
yusukebe
7
3.6k
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
270
Visual StudioのGitHub Copilotでいろいろやってみる
tomokusaba
1
210
Learning Kotlin with detekt
inouehi
1
150
良いコードレビューとは
danimal141
5
900
Featured
See All Featured
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
650
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
A Modern Web Designer's Workflow
chriscoyier
693
190k
What's in a price? How to price your products and services
michaelherold
244
12k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Optimizing for Happiness
mojombo
377
70k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
193
16k
Visualization
eitanlees
146
15k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Transcript
Firebase Notifications wasabeef shibuya.apk #8 at Google Japan
About me Daichi Furiya wasabeef @wasabeef_jp CyberAgent, Inc.
Firebase
Firebase https://firebase.google.com/
Analytics
Crash Reporting
Notifications
Firebase Notifications
Why?
Create Android app
Create Android app
Create Android app
Dependencies dependencies { // ... compile 'com.google.firebase:firebase-messaging:9.0.2' }
FirebaseMessagingService public class MyMessagingService extends FirebaseMessagingService { @Override public void
onMessageReceived(RemoteMessage msg) { sendNotification(msg.getNotification().getBody()); } private void sendNotification(String body) { // NotificationManager#notify } }
FirebaseInstancedIdService public class MyIdService extends FirebaseInstanceIdService { @Override public void
onTokenRefresh() { sendRegistrationToServer(refreshedToken); } private void sendRegistrationToServer(String token) { // send to your server } }
Topic findViewById(R.id.button).setOnClickListener(v -> { FirebaseMessaging.getInstance() .subscribeToTopic("mytopic"); // FirebaseMessaging.getInstance() .unsubscribeFromTopic("mytopic"); });
Compose message
Status
Conclusion
Thank you. twitter.com/wasabeef_jp wasabeef.jp github.com/wasabeef