Java SDK 1.2.0 - expiry of inapp date serialisation issue

Wrong method is used to serialize 'expiry' field of 'inapp'  
InAppSerializer in line 20 has jsonGenerator.writeStringField("expiry", inApp.getExpiry().get().toString()), which gives output with milliseconds and timezone included. for exmpl. '2017-01-11T12:52:45.213Z' 
Should be 
jsonGenerator.writeString(DateFormats.DATE_FORMATTER.print(payload.getExpiryTimeStamp().get()));  as it is in PushExpirySerializer. Output should be '2017-01-11T12:52:45'

Currently I'm getting exception with 'Error:Invalid 'expiry' value in in_app message payload.' error description inside, when I send inapp with expiry defined

Didn't find what you were looking for?

New post

Comments

2 comments

  • Hi Alexandra,

    This is Sean with Urban Airship Technical Support.

    Thank you for bringing this issue to our attention.

    I will be escalating this issue to our Engineering team and will let you know when I have more information.

    Thank you,

    Sean Conlin

    Urban Airship Technical Support

    Portland, Oregon

    Comment actions Permalink
    0
  • Hi Alexandra,

    Just wanted to let you know that this issue will be fixed in the next release our Java library. We have a major release of the Java library coming soon and the fix was rolled into it.

    Please let me know if you have any other questions or concerns.

    Thank you,
    Sean Conlin
    Urban Airship Technical Support
    Portland, Oregon

    Comment actions Permalink
    0

Please sign in to leave a comment.