roblav96 / nativescript-onesignal

A Nativescript plugin that wraps the iOS and Android OneSignal Push Notifications SDK.
https://documentation.onesignal.com/docs/getting-started
Other
24 stars 42 forks source link

Additional data how can I get in app? #22

Open ghost opened 7 years ago

ghost commented 7 years ago

Can You help me how can I get additional data when clicked message and send additional data. Thanx Bumbella

roblav96 commented 7 years ago

@bumbella I've actually never tried doing this before so I'm not too sure :X

alexandruantonica commented 7 years ago

Hi @roblav96 I'm going to use your plugin for my app. Could you confirm that I could send additional data via this plugin, please ? If we can't, let's find a way because I think it's useful feature.

Thanks.

GustavoEdinger commented 6 years ago

After TnsOneSignal.startInit was called you can begin use TnsOneSignal.sendTag method:

let TnsOneSignal = require('nativescript-onesignal').TnsOneSignal;
TnsOneSignal.sendTag("key_name", "value");

In my tests TnsOneSignal.sendTags doesn't work, so I needed to send tag by tag.