urbanairship/java-library — pull request #26 by TutteRamson (2014-12-23 19:15:59+00:00)
Title: Device token manipulation

Details on commit: https://github.com/TutteRamson/java-library/commit/08185262384a12bb221eac671c492e517e2d299f

Introducing methods(& unit tests) in APIClient to create and delete(aka register and un-register) device tokens.
In situations where the App doesn't use UA mobile client library, it can't automatically register device token and the onus falls on server.

If the user opted out notifications in the App, Apple may deactivate the device token and Urban Airship will learn about it from Apple Feedback Service and mark the device token as such. Later if the user enabled notifications and if the App doesn't use UA mobile client library then server has to register the device token again to send push notifications. The new methods introduced help in that case.

p.s: The PUT and DELETE requests on /api/device_tokens can't have Content-type header. If that header is present we get "HTTP/1.1 415 Unsupported Media Type" response.

See also: https://github.com/urbanairship/java-library/pull/25