I’m trying to make my notification icon look correctly when I receive it on my cell phone.
I have tried adding in my app.json.
My image is .png and has a white background and blue lettering text.
I also tried to send it from my api made in php with Guzzle.
Assuming that the icon exists in the root of the React Native project. I also tried pointing to a route within the api with the image and it didn’t work either.
Testing from Fire Base Console, it is also displayed erroneously.
Could someone tell me where the problem is? I attach my app.json.
"expo": {
"name": "ISSUNNE",
"slug": "ISSUNNE",
"version": "1.0.1",
"orientation": "portrait",
"icon": "./assets/issunne_new2.png",
"notification":{
"icon": "./assets/issunne_new2.png"
},
"userInterfaceStyle": "automatic",
"splash": {
"image": "./assets/issunneico.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"buildNumber": "1.0.1",
"supportsTablet": true,
"requireFullScreen": true,
"icon": "./assets/issunneico_lanzamiento.png",
"bundleIdentifier": "com.kloud97.ISSUNNE"
},
"android": {
"icon": "./assets/issunne_new2.png",
"googleServicesFile": "./google-services.json",
"versionCode": 4,
"adaptiveIcon": {
"foregroundImage": "./assets/issunneico_lanzamiento.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.kloud97.ISSUNNE"
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "XXXX"
}
}
}
}
App Icon is:App icon is 72x72 background transparent
How it looks: https://i.stack.imgur.com/d4E98.jpg
I have tried adding in my app.json.
Rebuild the app with ‘eas build --profile development --platform android’ then ‘expo start --dev-client’.
I tried to send it from my api in PHP .
'to' => $request->FCM,
'notification' => [
'title' => 'Test custom 2',
'body' => 'das',
'icon' => './assets/issunne_new2.png',
"image"=> "https://cdn4.iconfinder.com/data/icons/ionicons/512/icon-camera-512.png"
],
];```
Nothing worked.