Help us understand the problem. What is going on with this article?

Chrome44,45におけるPush Notificationの仕様変更(BREAKING CHANGE)

More than 3 years have passed since last update.

Chrome Canary版でbpushを動かしてみたら動かず。。。
原因を探るとPush APIで破壊的変更があったようで。
これらはChrome44でDeprecatedになりChrome45では削除されるようです。

PushSubscription.subscriptionIdの廃止

このプロパティでGCMでPUSH通知するためのIDを取得できるのですが廃止されます。
替わりに PushSubscription.endpoint を使う必要があります。
URL形式の文字列ですがendpointなのでsubscriptionIdに相当する文字列を含んでいます。

こんな感じで。
js
var subscriptionId = subscription.endpoint.split("/").pop();

PushManager.subscribe({options})でuserVisibleOnly:trueが必須となった

これまではオプションを指定しないでも動いてくれていたのですが、userVisibleOnly:true が必須となったようです。

serviceWorker.pushManager.subscribe({userVisibleOnly:true}).then(onSuccess, onError);

こんな公式文書も用意してくれています。
https://docs.google.com/document/d/13VxFdLJbMwxHrvnpDm8RXnU41W2ZlcP0mdWWe9zXQT8/edit?pli=1#heading=h.1lvfa4613jof

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away