Problem with notification icon in status bar.
See original GitHub issueHave been trying to change icon of notification on status bar for a day. Cannot make it work properly. On standalone app, expo icon is showing up on status bar instead of my app.
Expected Behavior
Click below (it is a white icon)
The icon below should be shown instead of expo icon.
Screenshots below explain the issue more clearly.
(Write what happened. Add screenshots!)
Reproducible Demo
app.json file
{ "expo": { "name": "Delivera Business", "slug": "Delivera-Restaurants", "privacy": "public", "sdkVersion": "32.0.0", "platforms": ["ios", "android"], "version": "1.0.0", "orientation": "portrait", "icon": "./assets/icon.png", "splash": { "image": "./assets/splash.png", "resizeMode": "contain", "backgroundColor": "#ffffff" }, "notification": { "icon": "./assets/notification_icon.png", "color": "#8ac53f", "androidMode": "default", "androidCollapsedTitle": "Delivera Business" }, "updates": { "fallbackToCacheTimeout": 0 }, "android": { "package": "restaurants.delivera.uz" }, "assetBundlePatterns": ["**/*"], "ios": { "supportsTablet": true, "bundleIdentifier": "restaurants.delivera.uz" } } }
Issue Analytics
- State:
- Created 5 years ago
- Comments:8
Michael I greatly appreciate this. Now I have it working. I’m surprised Expo doesn’t stress these app.json settings in the push notification documentation. I read through that page about 100x and I see no mention of this requirement. Thank you again.
Hello @sreubenstone , Pardon me if this is coming late.
First, you are right that expo.notification is found in the app.json.
"expo": { "name": { ... } "platforms": [ "ios", "android" ], "version": "1.0.0", "orientation": "portrait", "icon": "./assets/icon.png", "**notification**": { "icon": "**./assets/pnicon.png**" }, ... }
I am sure you presently do not have the notification property in your app.json. So, just add it yourself and give it an icon property whose value will be the relative path to the folder containing the icon you wish to use.Now, concerning the icon nature. Expo specified they need a 96px by 96px PNG8 grayscale type icon with transparency. You can easily achieve that with photoshop, In case you want to check out the official expo link, this is it here - https://docs.expo.io/versions/latest/workflow/configuration/
Meanwhile, you can also check the screenshot from the expo page below for confirmation.
In my case, even after the whole configuration, my PN icon didnt show until I made a new build. I guess thats due to the preciously cached icon which had to be replaced in the new build.
I hope this helps. Please let me know if there’s anything you don’t understand. Thanks!