Expo push notifications using expo branding

Hi there, I am using expo push notifications and the push notifications has the expo icon branding. I was assuming that when I went to production it would change to my app icon but it did not. Is there something I am doing wrong or do I have to use the expo icon on all my push notifications?

How have you went to production? Have you built a standalone app?

yes standalone app, in the store

OK, great. What does your app.json look like? Can you copy and paste its contents here?

{
“expo”: {
“scheme”: “my-app”,
“androidStatusBar”: {
“backgroundColor”: “#34353c”,
“barStyle”: “light-content”
},
“name”: “my-app”,
“description”: “myApp description.”,
“slug”: “my-app”,
“privacy”: “unlisted”,
“sdkVersion”: “32.0.0”,
“platforms”: [
“ios”,
“android”
],
“version”: “1.0.0”,
“orientation”: “portrait”,
“splash”: {
“image”: “./platformAssets/splash.png”,
“resizeMode”: “cover”
},
“updates”: {
“fallbackToCacheTimeout”: 0
},
“assetBundlePatterns”: [
“**/*”
],
“ios”: {
“supportsTablet”: true,
“icon”: “./platformAssets/ios_icon.png”,
“bundleIdentifier”: “com.mycompany.myapp”
},
“android”: {
“package”: “com.mycompany.myapp”,
“versionCode”: 1,
“icon”: “./platformAssets/android_icon.png”,
“googleServicesFile”: “./google-services.json”
}
}
}

I see that you’re specifying ios.icon and android.icon, but not icon and notification.icon. Could you try to add the following, then re-build the app, and check if that works?

Don’t forget to replace with your own values.

{
  /* ... */

    /*
      Local path or remote URL to an image to use for your app's
      icon on iOS. If specified, this overrides the top-level "icon" key.

      Use a 1024x1024 icon which follows Apple's interface guidelines for icons, including color profile and transparency.

      Expo will generate the other required sizes.
      This icon will appear on the home screen and within the Expo app.
    */
  "icon": "./path/to/app_icon.png",

  "notification": {
    /*
      Local path or remote url to an image to use as the icon for push notifications.
      96x96 png grayscale with transparency.
    */
    "icon": "./path/to/push_icon.png",

    /*
      Tint color for the push notification image when it appears in the notification tray.
      6 character long hex color string eg: "#000000"
    */
    "color": STRING,

    /*
      Show each push notification individually "default" or collapse into one "collapse".
      Valid values: "default", "collapse"
    */
    "androidMode": STRING,

    /*
      If "androidMode" is set to "collapse", this title is used for the collapsed notification message.
      eg: "#{unread_notifications} new interactions"
    */
    "androidCollapsedTitle": STRING
  }

  /* ... */
}
4 Likes

Thanks I missed those values entirely!

No worries! Please let me know if this worked. :slight_smile:

do i have to put it in the store or can i test it just with an apk?

You should be able to test it with the apk.

I’m curious, did it work out for you?

It works! thank you so so much

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.