Expo 推送通知图标和标题
Expo push notification icon & title
我没找到在通知推送上设置图标和名称的方法。我更新了 app.json 和 运行 世博会发布但通知始终显示世博会图标和标题。这是我的 app.json,我错过了什么吗?
谢谢
{
"expo": {
"name": "app",
"slug": "app",
"version": "1.0.0",
"orientation": "portrait",
"privacy": "public",
"icon": "./assets/icon.png",
"notification": {
"icon": "./assets/notification.png",
"iosDisplayInForeground": true
},
"android": {
"useNextNotificationsApi": true
},
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#23317B"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
试试这个配置。
"notification": {
"icon": "./images/Logo.png",
"color": "#311b92",
"androidMode": "default",
"androidCollapsedTitle": "Updates from Colab.notes",
"iosDisplayInForeground": true
}
确保您有正确的图标和图标路径。
如果您运行在 Expo 模式下安装应用程序,则会显示 Expo 图标和标题。
要解决此问题,您需要构建应用程序并 运行 apk。
我没找到在通知推送上设置图标和名称的方法。我更新了 app.json 和 运行 世博会发布但通知始终显示世博会图标和标题。这是我的 app.json,我错过了什么吗? 谢谢
{
"expo": {
"name": "app",
"slug": "app",
"version": "1.0.0",
"orientation": "portrait",
"privacy": "public",
"icon": "./assets/icon.png",
"notification": {
"icon": "./assets/notification.png",
"iosDisplayInForeground": true
},
"android": {
"useNextNotificationsApi": true
},
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#23317B"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
试试这个配置。
"notification": {
"icon": "./images/Logo.png",
"color": "#311b92",
"androidMode": "default",
"androidCollapsedTitle": "Updates from Colab.notes",
"iosDisplayInForeground": true
}
确保您有正确的图标和图标路径。
如果您运行在 Expo 模式下安装应用程序,则会显示 Expo 图标和标题。 要解决此问题,您需要构建应用程序并 运行 apk。