is it possible to use Eddystone to trigger FCM(Firebase cloud messaging) for richer notifications?

267 views Asked by At

My intent is to send a user push notification through FCM when my webapp user(already subscribed to notifications) comes near a beacon transmitting Eddystone url. If the person does not have the app installed I would like the Android nearby notification to trigger but if the user is an existing app user who has already subscribed to app notifications, I would like to silence/suppress the nearby notification and use the eddystone-url meta:title and/or url to instead trigger a specfic push notification.

Even as I'm asking this I know for this to work, users Phone have to send a signal to my apps backend to trigger the FCM send. Not sure how though. Any guidance or alternative to show a more richer notification to existing app users would be greatly appreciated.

1

There are 1 answers

2
mmocny On BEST ANSWER

Great question, and great idea. Let me first summarize/clarify your question to make sure I have it right:

  • If your website/app is not yet installed, you would like Nearby to create a Notification whenever it is close to your Eddystone-URL beacons (to help drive incoming users). This is working well for you.

  • However, once your website/app is already installed, you would like to control Notifications yourself. You would like help accomplishing this.


I think there are two parts needed to solve this problem:

  1. How can your website/app know when it is near an Eddystone-URL beacon?
  2. How can your website/app let Nearby know it shouldn't fire a notification?

For (1), websites are not currently able to scan for Nearby beacons. There is an exciting new WebBluetooth api coming to the web (launching in Chrome very soon!), but it is not yet able to scan for beacons. This is something we hope we may get in 2017, but its not possible yet. Apps, however, can easily scan for URL beacons using the system Bluetooth apis.

For (2), I do not think it is possible yet to ask Nearby not to fire a notification conditional on your website/app being installed. However, I know this is a feature request we get from time to time and we are considering ways to support this use case. If all goes well, we will have something for you in 2017 around the time that (1) gets solved.


So, apologies, I don't think this will be possible for you to do today, but I do think its a great feature requests and I'll bring it to folks' attention.

(I also think Push Messaging is a red herring here, since you should be able to control notifications entirely on-device with Local Notifications).