Greetings,
I would like when sending a push notification to be able to show the publisher/sender user details(profile picture, name, location etc) on the recipient device.
I am unable to find this in the documentation
Regards,
George
Greetings,
I would like when sending a push notification to be able to show the publisher/sender user details(profile picture, name, location etc) on the recipient device.
I am unable to find this in the documentation
Regards,
George
Hello,
you can add the publisherId in the push notification’s headers. E.g for iOS:
PublishOptions *publishOptions = [PublishOptions new];
[publishOptions assignHeaders:@{@"ios-alert":@"alert", @"ios-badge":@1, @"ios-sound":@"default", @"publisherId":@"123"}];
You can find more information here (Messaging Api > Publish Push Notifications).
Regards, Olga
Hello Olga,
There is a set method
publishOptions.setPublisherId(value);
Does it work and if so how do i retrieve the value at the reciever device?
Or do you prefer i use
publishOptions.putHeader( "publisher-id", value);
and get it using
intent.getStringExtra("publisher-id")
Regards,
George
Both ways are correct.
Screenshot1 - setting publisher id via setter. Screenshot2 - via headers.
(My screenshots are for iOS but it should be similar for Android).
Regards, Olga
It worked, thanks very much, please mark the ticket as solved.
George