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

        int notificationId = intent.getIntExtra(PushManager.EXTRA_NOTIFICATION_ID, -1);

        Logger.info("Notification opened ID: " + notificationId);

        // ConversionId needs to be the send id and not the push id, naming is hard.
        UAirship.shared().getAnalytics().setConversionSendId(message.getSendId());

        // Set the conversion send metadata.
        UAirship.shared().getAnalytics().setConversionMetadata(message.getMetadata());

        // Notify the legacy in-app message manager about the push
        UAirship.shared().getLegacyInAppMessageManager().onPushResponse(message);

        Intent openIntent = new Intent(PushManager.ACTION_NOTIFICATION_OPENED)
                .putExtras(intent.getExtras())
                .addFlags(Intent.FLAG_RECEIVER_FOREGROUND)
                .setPackage(UAirship.getPackageName())
                .addCategory(UAirship.getPackageName());

        context.sendOrderedBroadcast(openIntent, null);
    }
/**
     * Handles the opened notification without an action.
     *
     * @param context The application context.
     * @param intent The notification intent.
     */
Handles the opened notification without an action.
@param context The application context.
@param intent The notification intent.
Handles the opened notification without an action . @param context The application context . @param intent The notification intent .
private void onNotificationOpenedProxy(Context context, Intent intent) {
        PushMessage message = PushMessage.fromIntent(intent);
        if (message == null) {
            Logger.error("CoreReceiver - Intent is missing push message for: " + intent.getAction());
            return;
        }
        int notificationId = intent.getIntExtra(PushManager.EXTRA_NOTIFICATION_ID, -1);
        Logger.info("Notification opened ID: " + notificationId);
        UAirship.shared().getAnalytics().setConversionSendId(message.getSendId());
        UAirship.shared().getAnalytics().setConversionMetadata(message.getMetadata());
        UAirship.shared().getLegacyInAppMessageManager().onPushResponse(message);
        Intent openIntent = new Intent(PushManager.ACTION_NOTIFICATION_OPENED)
                .putExtras(intent.getExtras())
                .addFlags(Intent.FLAG_RECEIVER_FOREGROUND)
                .setPackage(UAirship.getPackageName())
                .addCategory(UAirship.getPackageName());
        context.sendOrderedBroadcast(openIntent, null);
    }
private void onNotificationOpenedProxy ( Context context , Intent intent ) { PushMessage message = PushMessage . fromIntent ( intent ) ; if ( message == null ) { Logger . error ( "CoreReceiver - Intent is missing push message for: " + intent . getAction ( ) ) ; return ; } int notificationId = intent . getIntExtra ( PushManager . EXTRA_NOTIFICATION_ID , - 1 ) ; Logger . info ( "Notification opened ID: " + notificationId ) ; UAirship . shared ( ) . getAnalytics ( ) . setConversionSendId ( message . getSendId ( ) ) ; UAirship . shared ( ) . getAnalytics ( ) . setConversionMetadata ( message . getMetadata ( ) ) ; UAirship . shared ( ) . getLegacyInAppMessageManager ( ) . onPushResponse ( message ) ; Intent openIntent = new Intent ( PushManager . ACTION_NOTIFICATION_OPENED ) . putExtras ( intent . getExtras ( ) ) . addFlags ( Intent . FLAG_RECEIVER_FOREGROUND ) . setPackage ( UAirship . getPackageName ( ) ) . addCategory ( UAirship . getPackageName ( ) ) ; context . sendOrderedBroadcast ( openIntent , null ) ; }
Handles the opened notification without an action.
Handles the opened notification without an action .
// ConversionId needs to be the send id and not the push id, naming is hard. // Set the conversion send metadata. // Notify the legacy in-app message manager about the push