Package org.jboss.aerogear.unifiedpush.message

Examples of org.jboss.aerogear.unifiedpush.message.Message


            return;
        }

        final iOSVariant iOSVariant = (iOSVariant) variant;

        Message message = pushMessage.getMessage();
        PayloadBuilder builder = APNS.newPayload()
                // adding recognized key values
                .alertBody(message.getAlert()) // alert dialog, in iOS
                .badge(message.getBadge()) // little badge icon update;
                .sound(message.getSound()) // sound to be played by app
                .category(message.getActionCategory()); // iOS8: User Action category

                // apply the 'content-available:1' value:
                if (message.isContentAvailable()) {
                    // content-available is for 'silent' notifications and Newsstand
                    builder = builder.instantDeliveryOrSilentNotification();
                }

                builder = builder.customFields(message.getUserData()); // adding other (submitted) fields

        // we are done with adding values here, before building let's check if the msg is too long
        if (builder.isTooLong()) {
            // invoke the error callback and return, as it is pointless to send something out
            callback.onError("Nothing sent to APNs since the payload is too large");
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.unifiedpush.message.Message

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.