CleverTap/apns-http2

Localized Values in Aps object

tolgatanriverdi opened this issue · 6 comments

Hi
We were using javapns library but it has lots of problems so we decided to move apns-http2 library
However there is a core functionality that we are using in our push notificaitons which is localizable values in aps object

title-loc-key
title-loc-args

Are those variable supported in apns-http2, if its can you show me how can I build the notification object with these parameters

This library doesn't support it right now, however, its pretty easy to add it. I'd be open to a PR. See the class Notification.Builder. It'd be a good idea to just expose a getter for the aps map, so that anything can be added to it in the future.

If I can get the aps map, how can I set back again, all the methods that I can see are getters. I didnt see any setter method for that

Well, if you expose a getter for the aps HashMap, then you can modify it outside. It'll automatically be added when you call build().

But how can I edit the files in your library, because I'm using your library from Maven.
And the parameter you mentioned is private, at least if you can make them protected, I can subclass from Notification

@tolgatanriverdi I'll expose a getter for the aps dictionary. This will also you to add the localisable keys inside. Will this do?

Closing due to inactivity.