英文:
How do i add custom icon on expo push notification?
问题
我按照Expo的文档指南链接 进行了操作,但仍然无法工作,推送通知中的图标未显示。
{
  "expo": {
    ...
    "android": {
      "package": "com.moohub.safenaija",
      "googleServicesFile": "./google-services.json",
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "extra": {
      "eas": {
        "projectId": ".......",
      }
    }
  },
  "plugins": [
    [
      "expo-notifications",
      {
        "icon": "./assets/safe.png",
        "color": "#000000",
        "iosDisplayInForeground": true,
        "androidMode": "default",
        "androidCollapsedTitle": "Updates from SafeNaija"
      }
    ]
  ]
}
如果有人能帮助解决这个问题,我将不胜感激。
英文:
i followed the documentation guide on expo link , yet it doesn't work ,the icon is not displayed in the push notification
    {
  "expo": {
  
......
    "android": {
      "package": "com.moohub.safenaija",
      "googleServicesFile": "./google-services.json",
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      }
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "extra": {
      "eas": {
        "projectId": "......."
      }
    }
  },
  "plugins": [
    [
      "expo-notifications",
      {
        "icon": "./assets/safe.png",
        "color": "#000000'",
        "iosDisplayInForeground": true,
        "androidMode": "default",
        "androidCollapsedTitle": "Updates from SafeNaija"
      }
    ]
  ]
}
i would appreciate if someone can help solve this issue
答案1
得分: 0
我通过使用具有单色和透明背景的标志来解决了这个问题,生产中一切正常,显示标准标志。
英文:
for people who might have come across this issue, i solved it by using a logo with monochrome color and a transparent background,in production it all works well and displays the standard logo
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论