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');


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire