I am using the FCM Gem (https://github.com/decision-labs/fcm) to push notifications to our app. I can’t workout how to format the payload correctly in order to do deeplinks to either a browser website, or a page in the app. Any ideas?
def send_notification(device_token, notification)
# Prepare notification data structure
notification_data = {
data: {
payload: notification[:payload],
},
token: device_token,
notification: {
title: notification[:alert],
body: "",
},
android: {
notification: {
color: '#FF0000',
title: "hello 1" ,
},
}
}
# Send notification with retry on error
response = with_retry_on_error {
begin
response = fcm_client.send_v1(notification_data)