Skip to content
Switch branches/tags
Go to file

Airship Java Client Library

This is the official supported Java library for the Airship API. Please reach out to directly with any issues that need attention.


General documentation can be found here: Java client library documentation can be found here:


Manual installation

Clone the repository, and use

    mvn package

to build the jar. Add the jar, located at a path similar to:


If you would like a copy of the javadocs, use

    mvn javadoc:javadoc

Maven Installation

Add the following to your pom.xml

    <!-- Urban Airship Library Dependency-->
        <!-- Replace VERSION with the version you want to use -->

Upgrading to 6.X.X

Schedule requests now require a SchedulePayload object:

    SchedulePayload schedulePayload = SchedulePayload.newBuilder()
            .setNotification(Notifications.alert("Simple alert"))

    ScheduleRequest scheduleRequest = ScheduleRequest.newRequest(schedulePayload);

Schedule responses now contain an Immutable list of SchedulePayloadResponse objects instead of SchedulePayload objects inside the response body.

    Response<ScheduleResponse> response = client.execute(scheduleRequest);
    ImmutableList<SchedulePayloadResponse> schedulePayloadResponses = response.getBody().get().getSchedulePayloadResponses();

When creating a custom event request the CustomEventBody now requires CustomEventPropertyValue objects to support complex property objects.

    CustomEventPropertyValue customEventProperty = CustomEventPropertyValue.of("victory");

    List<CustomEventPropertyValue> items = new ArrayList<>();
    items.add(CustomEventPropertyValue.of("la croix"));
    items.add(CustomEventPropertyValue.of("more la croix"));

    CustomEventBody customEventBody = CustomEventBody.newBuilder()
        .addPropertiesEntry("brand", customEventProperty)
        .addPropertiesEntry("items", CustomEventPropertyValue.of(items))

    CustomEventPayload customEventPayload = CustomEventPayload.newBuilder()

CustomEventBody.getSessionId() will now return an Optional String instead of a String.


Java client library for the Urban Airship API




No packages published