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
[Online] potatotips #74 iOS/Android開発Tips共有会
Search
zoothezoo
June 23, 2021
Programming
1
1.1k
[Online] potatotips #74 iOS/Android開発Tips共有会
date: 2021/6/23 (Wed)
title: 【FCM】Androidの通知設定でハマった話
zoothezoo
June 23, 2021
Tweet
Share
More Decks by zoothezoo
See All by zoothezoo
Figma Dev Mode MCP Serverを用いたUI開発
zoothezoo
2
600
就活成功の秘訣
zoothezoo
0
1.1k
Other Decks in Programming
See All in Programming
OCaml 5でモダンな並列プログラミングを Enjoyしよう!
haochenx
0
140
Automatic Grammar Agreementと Markdown Extended Attributes について
kishikawakatsumi
0
200
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
740
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
180
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
290
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
Basic Architectures
denyspoltorak
0
680
360° Signals in Angular: Signal Forms with SignalStore & Resources @ngLondon 01/2026
manfredsteyer
PRO
0
130
AI巻き込み型コードレビューのススメ
nealle
2
420
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
760
ノイジーネイバー問題を解決する 公平なキューイング
occhi
0
110
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
150
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
GraphQLとの向き合い方2022年版
quramy
50
14k
The Limits of Empathy - UXLibs8
cassininazir
1
220
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
450
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
200
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Designing for humans not robots
tammielis
254
26k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
240
The Cult of Friendly URLs
andyhume
79
6.8k
Transcript
【FCM】 Androidの通知設定でハマった話 zoothezoo @zoothezoo_pro [Online] potatotips #74 iOS/Android開発Tips共有会
Kohei Ikezu @zoothezoo_pro CyberAgent, Inc. Tapple, Inc. 2021年 新卒
話すこと - 今回のバグと解決方法 - ちょっとしたTips 話さないこと - 通知の作り方の基本 - FCMに概要など
🤔 Push通知がChannelに正常に割り振られない
Foregroundではちゃんと処理されるがBackgroundの時に 🤔 Push通知がChannelに正常に割り振られない
どうやって振り分けるの? Channel IDをChannelに設定する Push通知にChannel IDを指定する 届く🎉
サーバ FCM Android
通知が届き続けてしまう 例) いいねの通知受け取りをOFFにする Push通知を受信してしまう
Channel 「その他」 - 身に覚えのない「その他」が作成されている - 英語だと “miscellaneous” - 全ての通知が「その他」に割り振られてしまう
知らないChannelが作成されている - NotificationManager.getChannels() - 全てのチャンネルを取得 - 登録済みチャンネルの1つに 右のようなものがある - fcm_fallback
_notification_channel??
なぜ作成されるか? > 受信メッセージで通知チャネルが明示的に設定されていない場合、 > FCM では常にこの値が使用されます。 どうやらChannel IDが 明示的に設定されていないらしい
データメッセージと通知メッセージ データメッセージ - クライアントで処理 - コールバック関数で処理 About FCM messages |
Firebase 通知メッセージ - FCM SDKで自動処理 - BGでは通知トレイで受信 - FGではコールバック関数にて処理
今回のケースの解決方法 - Push通知をBackgroundで受け取りたいには通知メッセージ - key-valueの形式にてchannelIdを指定する - できる🎉
tips: 自分で設定する - 予期せぬChannel IDが来る場合 - タイポなど - 自分で名前を設定できます -
その他, OTHER etc. AndoidManifest.xml Set up a Firebase Cloud Messaging client app on Android
tips: ChannelがOFFの状態を知りたい - ON/OFFを知れる関数はなさそう - 🔑 IMPORTANCE_NONE - デフォルトで通知OFFにしたいcreate する時点で設定
Create and Manage Notification Channels How can I know programmatically if a notification channel is enabled on Android O?
まとめ - サーバからChannel IDを指定する - Push通知を送るときは通知メッセージ - ドキュメントを読み込もう @zoothezoo_pro