Expo

Customizing Push Notifications using the Firebase Messaging Library in Expo and React Native

You’ll learn how to customize the push notification icon launched in React Native with the @react-native-firebase/messaging library today.

Notification postal - pexels

We’ll go to app.json

"notification": { "icon": "./src/assets/notification-icon.png", "color": "#d76d6d" },

We also added to the config plugin

"@react-native-firebase/messaging"

With this, we’re halfway done.

Now we need to create our notification icon.

Only applies to Android.

The icon must be

Size: 96 x 96 Color: white Format: .png transparent We save it in the indicated path within the assets.

Now we execute this command

npm run prebuild

This is how our icon will be generated.

Categories

Leave a Comment