urbanairship-core/src/main/java/com/urbanairship/AirshipReceiver.java
private void handlePushReceived(@NonNull Context context, @NonNull Intent intent) {
        PushMessage message = PushMessage.fromIntent(intent);
        if (message == null) {
            Logger.error("AirshipReceiver - Intent is missing push message for: " + intent.getAction());
            return;
        }

        boolean notificationPosted = intent.hasExtra(PushManager.EXTRA_NOTIFICATION_ID);
        onPushReceived(context, message, notificationPosted);

        if (notificationPosted) {
            int id = intent.getIntExtra(PushManager.EXTRA_NOTIFICATION_ID, -1);
            onNotificationPosted(context, new NotificationInfo(message, id));
        }
    }
/**
     * Handles the push received intent.
     *
     * @param context The application context.
     * @param intent The push received intent.
     */
Handles the push received intent.
@param context The application context.
@param intent The push received intent.
Handles the push received intent . @param context The application context . @param intent The push received intent .
private void handlePushReceived(@NonNull Context context, @NonNull Intent intent) {
        PushMessage message = PushMessage.fromIntent(intent);
        if (message == null) {
            Logger.error("AirshipReceiver - Intent is missing push message for: " + intent.getAction());
            return;
        }
        boolean notificationPosted = intent.hasExtra(PushManager.EXTRA_NOTIFICATION_ID);
        onPushReceived(context, message, notificationPosted);
        if (notificationPosted) {
            int id = intent.getIntExtra(PushManager.EXTRA_NOTIFICATION_ID, -1);
            onNotificationPosted(context, new NotificationInfo(message, id));
        }
    }
private void handlePushReceived ( @ NonNull Context context , @ NonNull Intent intent ) { PushMessage message = PushMessage . fromIntent ( intent ) ; if ( message == null ) { Logger . error ( "AirshipReceiver - Intent is missing push message for: " + intent . getAction ( ) ) ; return ; } boolean notificationPosted = intent . hasExtra ( PushManager . EXTRA_NOTIFICATION_ID ) ; onPushReceived ( context , message , notificationPosted ) ; if ( notificationPosted ) { int id = intent . getIntExtra ( PushManager . EXTRA_NOTIFICATION_ID , - 1 ) ; onNotificationPosted ( context , new NotificationInfo ( message , id ) ) ; } }
Handles the push received intent.
Handles the push received intent .