I have built an app using React Native (Reminder App) and i need it to show notification. That is working perfectly but when i receive a notification the icon shows as a small purple square. Below is an image of similar output found on google
Expected Output: Should show my icon on top left of notification
My current code in app.json is:
"expo": {
"name": "Reminders",
"slug": "Reminders",
"version": "2.0.0",
"orientation": "portrait",
"icon": "./assets/icon1.png",
"splash": {
"image": "./assets/splash1.png",
"resizeMode": "cover",
"backgroundColor": "#FFFFFF",
"plugins": [
[
"expo-notifications",
{
"icon": "./assets/icon1.png",
"color": "#ffffff"
}
]
]
},
"notification": {
"icon":"./assets/icon1.png",
"color": "#7f2ee1"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon1.png",
"backgroundColor": "#FFFFFF"
},
"icon":"./assets/icon1.png",
"package": "com.d99.reminders",
"versionCode":4
},
"web": {
"favicon": "./assets/icon1.png"
}
}
}
I followed the instructions on the official docs for expo-notifications but the issue remains.
Any idea on how to show my icon there?
edit: here is the icon [icon]
Related
I have my Expo React Native - Stand Alone app (Published to Test Flight) and I still seeing the Expo icon on the push notifications:
This is my app.json
{
"expo": {
"name": "test-answers",
"slug": "test-answers",
"version": "1.0.6",
"orientation": "portrait",
"icon": "./assets/images/appicon-1024.png",
"scheme": "myapp",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"notification":{
"icon":"./assets/images/push-notification-icon-expo.png",
"color": "#311b92",
"androidMode": "default",
"androidCollapsedTitle": "Updates from Test Answers",
"iosDisplayInForeground": true
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"platforms" :[
"ios",
"android"
],
"ios": {
"icon": "./assets/images/appicon-1024.png",
"usesAppleSignIn": true,
"supportsTablet": true,
"bundleIdentifier": "com.test.test",
"config": {
"googleMobileAdsAppId": "ca-app-pub-111222~111222",
"googleMobileAdsAutoInit" : true
},
"googleServicesFile": "./assets/GoogleService-Info.plist",
"buildNumber": "1.0.6"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"config": {
"googleMobileAdsAppId": "ca-app-pub-111222~111222",
"googleMobileAdsAutoInit" : true
},
"googleServicesFile": "./assets/google-services.json",
"package": "com.test.test",
"versionCode": 1
},
"web": {
"favicon": "./assets/images/favicon.png",
"config": {
"firebase": {
"apiKey": "abc123",
"measurementId": "G-123abc"
}
}
}
}
}
Any clue?
I am building an android app with Expo, but failed every time.
Here is my app.json
"expo": {
"name": "Imct",
"slug": "Imct",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./src/asset/Logo/IMCT.png",
"splash": {
"image": "./src/asset/Logo/imct2.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.isuzu.imct"
},
"android": {
"versionCode": 2,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"googleServicesFile": "./google-services.json",
"package": "com.isuzu.imct"
},
when I run
expo build:android
I got the results is
Screenshot 2022-03-17 104029
How can I fix this?
I'm trying to build my react-native app but I keep getting this error.
{
"expo": {
"name": "NuCamp",
"slug": "nucampsite",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"bundleIdentifier": "co.nucamp.nucampsite.student"
},
"android": {
"package": "co.nucamp.nucampsite.student"
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
this is my first time doing this and I'm completely lost. I tried searching for other people that had the same problems but I couldn't find any.
you are using expo-cli#3.9.1, as the warning explains there is a much newer version and you should install it and use it instead :) that will resolve your issue
Usually when i login either with google or Facebook in my app i get automatically redirected to the home menu that is a map but after i build and ran my app i get stuck in loading Screen every-time after i log in
this is my app.json
{
"expo": {
"name": "AgriEdgeApp",
"slug": "AgriEdgeApp",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "expo.AgriEdgeApp.AgriEdgeApp",
"versionCode": 1
},
"description": ""
}
}
before building :
before building
after building :
after building
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
How to customize expo default splash screen and hide it in react native .
Expo splash screen gets cut from two side of the screen in android. Although it working fine in Ios.
You can define different splashes for android and iOS, and within each, differnt splashes for different screen densities. resizeMode can help, too.
You can see densities for various android devices here:
https://material.io/tools/devices/
And here is a sample app.json of mine, with different splash files:
{
"expo": {
"name": "Magic App",
"description": "All the important information about my Pet",
"slug": "magicapp",
"privacy": "public",
"sdkVersion": "31.0.0",
"platforms": [
"ios",
"android"
],
"version": "0.43",
"orientation": "default",
"icon": "./assets/images/icon.png",
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.yossi.magicapp",
"splash": {
"image": "./assets/images/splash-ios.png",
"tabletImage": "./assets/images/splash-ios-tablet.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
}
},
"android": {
"package": "com.yossi.magicapp",
"versionCode": 1,
"permissions": [
"CAMERA",
"CAMERA_ROLL",
"READ_INTERNAL_STORAGE",
"READ_EXTERNAL_STORAGE",
"WRITE_EXTERNAL_STORAGE"
],
"splash": {
"ldpi": "./assets/images/splash.png",
"mdpi": "./assets/images/splash.png",
"hdpi": "./assets/images/splash.png",
"xhdpi": "./assets/images/splash.png",
"xxhdpi": "./assets/images/splash.png",
"xxxhdpi": "./assets/images/splash.png",
"tabletImage": "splash-android-tablet.png",
"resizeMode": "cover",
"backgroundColor": "#ffffff"
},
"icon": "./assets/images/icon.png",
"adaptiveIcon": {
"foregroundImage": "./assets/images/icon-oreo.png",
"backgroundColor": "#15b3bf"
}
}
},
"hooks": {
"postPublish": [
{
"file": "sentry-expo/upload-sourcemaps",
"config": {
"organization": "self-dm",
"project": "magicapp",
"authToken": "0ca29a9ed2e84e86bbac3e0e81b6e1ac208cf77f08ef48f9b28732d028e50cf6"
}
}
]
}
}