Deeplink seems not working
harrykc opened this issue · 2 comments
Hello, thanks for the great package.
I am sending notification with deep link, with a custom URI when click the notification. one signal also provided this feature, https://documentation.onesignal.com/docs/links
At the moment I am trying send via GCM, and I have checked node-gcm documentation, it should allows to add link parameter to notification, e.g.
message.addNotification('link', 'app://xxxx/123456');
Also, I have checked sendGCM.js and seems missing 'link' parameter for the notification object, please correct me if I am misunderstanding or can be achieved in other way.
For APN, I have not check yet.
So, could you update this package to support link parameter? Thank you.
More information, I tried click_action but not working, and i found this https://stackoverflow.com/questions/63203360/open-deep-link-url-when-click-on-fcm-notification
'link' is work but seems not mention in the document.
My testing code with node-gcm
var gcm = require('../lib/node-gcm');
var message = new gcm.Message();
message.addNotification('title', 'Hello');
message.addNotification('body', 'World');
message.addNotification('link', 'app://xxxx/123456');
//Add your mobile device registration tokens here
var regTokens = [''];
//Replace your developer API key with GCM enabled here
var sender = new gcm.Sender('');
sender.send(message, regTokens, function (err, response) {
if(err) {
console.error(err);
} else {
console.log(response);
}
});
link parameter seems not used any more, but it still work for me. So i use node-gcm directly.