Firebase pyfcm send push notification with an image

i am trying to send push notifications using Firebase and pyfcm https://pypi.python.org/pypi/pyfcm/. But i want to know how to send a image with the notification, because searching in the parameters there are no option

this is the documentation code of pyfcm:

def notify_multiple_devices(self,
                            registration_ids=None,
                            message_body=None,
                            message_title=None,
                            message_icon=None,
                            sound=None,
                            condition=None,
                            collapse_key=None,
                            delay_while_idle=False,
                            time_to_live=None,
                            restricted_package_name=None,
                            low_priority=False,
                            dry_run=False,
                            data_message=None,
                            click_action=None,
                            badge=None,
                            color=None,
                            tag=None,
                            body_loc_key=None,
                            body_loc_args=None,
                            title_loc_key=None,
                            title_loc_args=None,
                            content_available=None,
                            extra_kwargs={}):


so which parameter i should use to send an url image??

thanks

Answers

There is a way to add image in notification area using PYFCM. extra_notification_kwargs allows us to add image in the notification.

we have to pass:

    extra_notification_kwargs = {
    'image':  #paste your notification image url here
    }

    notify_multiple_devices(.., 
    extra_notification_kwargs=extra_notification_kwargs)

similarly we can send to multiple devices also.

Posted on by Gaurav Nagpure