mercredi 3 mars 2021

Laravel FCM push notification change default sound

I am not able to change the default sound of push notification on the background.

I am using Laravel 6 I have seen many similar issues on stack overflow and other forms majority of them are are not working, broken or un answered.

I am pasting my code below help me if anyone can.

        $optionBuilder = new OptionsBuilder();
        $optionBuilder->setTimeToLive(60 * 20);
        $notificationBuilder = new PayloadNotificationBuilder(ucfirst($all_data['title']));
        $notificationBuilder->setClickAction('FCM_PLUGIN_ACTIVITY');
        $notificationBuilder->setBody(ucfirst($all_data['message']))
            ->setSound('nokia.mp3')->getBadge('42');


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3qdD4NZ
via IFTTT

1 commentaire:

  1. That's amazing informative post, I want to add one more thing, If you want to make your web visitor to your subscriber then you should definitely check gravitec lifetime deal Best push notification for website ever.

    RépondreSupprimer