Package 

Object RichPushHandler


  • 
    public class RichPushHandler
    
                        

    Helper for building rich push notifications with images. Used by AppDNAMessagingService to display BigPictureStyle notifications.

    SPEC-070-A H.21 — small-icon resolution delegated to NotificationIconResolver so the icon priority chain stays in lockstep with AppDNAMessagingService.

    SPEC-070-A H.21b — server-supplied channel_importance overrides the default IMPORTANCE_HIGH when the channel is created here.

    SPEC-070-A H.23 — bitmap download moved off the FCM listener thread into a coroutine with an 8-second wall-clock cap (well under FCM's 10s service window). Previously, the default URL connection's 25s combined timeout could cause the FCM service to be killed before the notification posted.

    SPEC-070-A E.6 — rich-media handling for GIF and video URLs:

    • GIF: FCM/NotificationCompat.BigPictureStyle only renders a single still bitmap, so we decode the first frame of the GIF and surface it as the BigPicture. (Animated rendering inside the notification shade isn't supported by the platform.)

    • Video (MP4 / MOV / WEBM …): we pull the closest sync frame near t=0 via MediaMetadataRetriever and use that as the BigPicture thumbnail.

    The selection between paths is driven by the optional mediaType argument (mapped from FCM data.media_type) with a filename-extension fallback so the server can omit the field for backward compatibility.