Skip to content
This repository was archived by the owner on May 28, 2024. It is now read-only.

プッシュ通知対応 #3

Open
amotarao opened this issue Jul 15, 2019 · 2 comments
Open

プッシュ通知対応 #3

amotarao opened this issue Jul 15, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@amotarao
Copy link
Owner

詳細

record 作成時 (すなわち、フォロワーの増減が認められたとき) に、ユーザーにプッシュ通知を行いたい。
課金機能にしたい。

@amotarao amotarao added the enhancement New feature or request label Jul 15, 2019
@amotarao
Copy link
Owner Author

https://firebase.google.com/docs/cloud-messaging/js/client?hl=ja
https://firebase.google.com/docs/cloud-messaging/js/receive?hl=ja

  • Notification.requestPermission() で通知の許可を求める
  • messaging.getToken() / messaging.onTokenRefresh() で Messaging 用のトークンを取る
  • トークンを Firestore に保存
  • records にドキュメントが追加される度に、トークンを元にプッシュ通知

@amotarao
Copy link
Owner Author

firebase.messaging() は クライアントの処理にしないとサーバーエラーになる (Next)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant