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

        NotificationInfo notificationInfo = new NotificationInfo(message, id);

        boolean launchedActivity;
        if (intent.hasExtra(PushManager.EXTRA_NOTIFICATION_BUTTON_ID)) {

            String buttonId = intent.getStringExtra(PushManager.EXTRA_NOTIFICATION_BUTTON_ID);
            boolean isForeground = intent.getBooleanExtra(PushManager.EXTRA_NOTIFICATION_BUTTON_FOREGROUND, false);
            Bundle remoteInput = intent.getBundleExtra(EXTRA_REMOTE_INPUT);

            ActionButtonInfo actionButtonInfo = new ActionButtonInfo(buttonId, isForeground, remoteInput);
            launchedActivity = onNotificationOpened(context, notificationInfo, actionButtonInfo);
        } else {
            launchedActivity = onNotificationOpened(context, notificationInfo);
        }

        // Only set the result if we have an ordered broadcast and the result is not already activity launched.
        if (isOrderedBroadcast() && getResultCode() != RESULT_ACTIVITY_LAUNCHED) {
            setResultCode(launchedActivity ? RESULT_ACTIVITY_LAUNCHED : RESULT_ACTIVITY_NOT_LAUNCHED);
        }
    }
/**
     * Handles the push opened intent.
     *
     * @param context The application context.
     * @param intent The push opened intent.
     */
Handles the push opened intent.
@param context The application context.
@param intent The push opened intent.
Handles the push opened intent . @param context The application context . @param intent The push opened intent .
private void handlePushOpened(@NonNull Context context, @NonNull Intent intent) {
        int id = intent.getIntExtra(PushManager.EXTRA_NOTIFICATION_ID, -1);
        PushMessage message = PushMessage.fromIntent(intent);
        if (message == null) {
            Logger.error("AirshipReceiver - Intent is missing push message for: " + intent.getAction());
            return;
        }
        NotificationInfo notificationInfo = new NotificationInfo(message, id);
        boolean launchedActivity;
        if (intent.hasExtra(PushManager.EXTRA_NOTIFICATION_BUTTON_ID)) {
            String buttonId = intent.getStringExtra(PushManager.EXTRA_NOTIFICATION_BUTTON_ID);
            boolean isForeground = intent.getBooleanExtra(PushManager.EXTRA_NOTIFICATION_BUTTON_FOREGROUND, false);
            Bundle remoteInput = intent.getBundleExtra(EXTRA_REMOTE_INPUT);
            ActionButtonInfo actionButtonInfo = new ActionButtonInfo(buttonId, isForeground, remoteInput);
            launchedActivity = onNotificationOpened(context, notificationInfo, actionButtonInfo);
        } else {
            launchedActivity = onNotificationOpened(context, notificationInfo);
        }
        if (isOrderedBroadcast() && getResultCode() != RESULT_ACTIVITY_LAUNCHED) {
            setResultCode(launchedActivity ? RESULT_ACTIVITY_LAUNCHED : RESULT_ACTIVITY_NOT_LAUNCHED);
        }
    }
private void handlePushOpened ( @ NonNull Context context , @ NonNull Intent intent ) { int id = intent . getIntExtra ( PushManager . EXTRA_NOTIFICATION_ID , - 1 ) ; PushMessage message = PushMessage . fromIntent ( intent ) ; if ( message == null ) { Logger . error ( "AirshipReceiver - Intent is missing push message for: " + intent . getAction ( ) ) ; return ; } NotificationInfo notificationInfo = new NotificationInfo ( message , id ) ; boolean launchedActivity ; if ( intent . hasExtra ( PushManager . EXTRA_NOTIFICATION_BUTTON_ID ) ) { String buttonId = intent . getStringExtra ( PushManager . EXTRA_NOTIFICATION_BUTTON_ID ) ; boolean isForeground = intent . getBooleanExtra ( PushManager . EXTRA_NOTIFICATION_BUTTON_FOREGROUND , false ) ; Bundle remoteInput = intent . getBundleExtra ( EXTRA_REMOTE_INPUT ) ; ActionButtonInfo actionButtonInfo = new ActionButtonInfo ( buttonId , isForeground , remoteInput ) ; launchedActivity = onNotificationOpened ( context , notificationInfo , actionButtonInfo ) ; } else { launchedActivity = onNotificationOpened ( context , notificationInfo ) ; } if ( isOrderedBroadcast ( ) && getResultCode ( ) != RESULT_ACTIVITY_LAUNCHED ) { setResultCode ( launchedActivity ? RESULT_ACTIVITY_LAUNCHED : RESULT_ACTIVITY_NOT_LAUNCHED ) ; } }
Handles the push opened intent.
Handles the push opened intent .
// Only set the result if we have an ordered broadcast and the result is not already activity launched.