fernandospr / java-wns

Java Service Provider to send push notifications to Windows 8/10 devices through WNS
BSD 3-Clause "New" or "Revised" License
28 stars 23 forks source link

MalFormed Toast Templates #12

Closed zmouhoubi closed 8 years ago

zmouhoubi commented 8 years ago

Hi Fernando, First i apologize for my average english.

Thank you for the java-wns api, it's a great job and help me to send notifications.

I would like submit a bug about the received notification, it's dosn't display the icon app and the text was always "New notification".
when a use java-wns, the used Toast template 01 is like this : (<toast><type>wns/toast</type><visual><binding template="ToastText01"><text><text id="1">Sample Text</text></text></binding></visual><audio/></toast>) but in the toast template catalog the good one is (<toast><visual><binding template="ToastText01"><text id="1">Sample Text</text></binding></visual></toast>) (whith only one tags not 2 like in the first one). When i test the java-wns toast template text 01 on the Web App i understand that the problem comes from the tags,(the one just before <text id="1"...).

Do you know how can i remove the tags that ares in plus ?

Thank you in advance for your help. Zahir.

fernandospr commented 8 years ago

Thanks @zmouhoubi, I will check this over the weekend.

zmouhoubi commented 8 years ago

Hi Fernando, have you takes few time to see if there à solution?

Thank you,

Zahir.

fernandospr commented 8 years ago

@zmouhoubi I have seen the problem but could not fix it yet. Can you try the previous version of the library?

zmouhoubi commented 8 years ago

Hi Fernando, Thank you for your response. I try the version 1.3 and it works so good, thank you very much.

Have a nice day, Zahir.

fernandospr commented 8 years ago

So it seems, 1.3.1 is not serializing the lists of elements correctly.

With 1.3.1: Hello world With older versions: Hello world

So for now, you should use older version until I find the way to fix it.

damiantone commented 8 years ago

Hi all,

for remove the tag type you can add an annotation in class WnsToast in getType(). For example:

@Override @XmlTransient public String getType() { return WnsNotificationType.TOAST; }

Regards,

damiantone

Sergio-Mira commented 8 years ago

@fernandospr thanks for this lib! I've fixed the serialization here https://github.com/fernandospr/java-wns/pull/14

fernandospr commented 8 years ago

@Sergio-Mira Thanks!

fernandospr commented 8 years ago

1.3.2 will have this fix.

twiedow commented 8 years ago

@fernandospr Do you know when v1.3.2 will be released?

fernandospr commented 8 years ago

1.4.0 is being released right now to Maven Central! Just wait for a few hours.

fernandospr commented 8 years ago

Released.

twiedow commented 8 years ago

Thanks a lot!