Expo splashScreen not changing - android

So I'm building an app apk file with expo, and I'm pointing to my splashscreen images on app.json.
{
"expo": {
"name": "D&D Monster Reference",
"slug": "dnd-monster-reference",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"mdpi": "./assets/splashScreen/splash-port-mdpi.png",
"ldpi": "./assets/splashScreen/splash-port-ldpi.png",
"hdpi": "./assets/splashScreen/splash-port-hdpi.png",
"xhdpi": "./assets/splashScreen/splash-port-xhdpi.png",
"xxhdpi": "./assets/splashScreen/splash-port-xxhdpi.png",
"xxxhdpi": "./assets/splashScreen/splash-port-xxxhdpi.png",
"resizeMode": "cover"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.example.example",
"versionCode": 1
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
But when I install the app, I get this default image as my splashcreen.
Am I doing something wrong here? I haven't found anything about it on expo docs.

I have had this issue too on managed workflow. How I solve it is to rename the new splash image. Any name apart from "splash" will do. I usually name mine "splashscreen".
I have noticed that if you don't do this and simply name the new splashscreen by the name "splash", your app will continue to show the old (default) splash even if you restart your server and clear cache and no matter how many times you reload your app. I don't know why. Maybe it is a bug that Expo team will resolve someday.
Let us know if this works for you. It works for me 100%.

If i understand the question right you are still seeing the expo splashscreen when starting the app? Go to android/app/src/main/res/drawable and see if the image is there, if it is remove it and test again.

Related

Expo push notifications working on expo go but not working on apk ( production )

I'm trying to implement expo push notification ! I did everything as the docs say.
Created a firebase project and downloaded the google-services.json and uploaded the server key on the cloud messaging to expo servers using expo push:android:upload --api-key <your-token-here> ! so basically I did everything mentioned on their docs! My notifications works perfectly fine when I test it on the Expo GO ! but after I built an apk using eas build -p android --profile preview
The notification doesn't pop up! the api that I send from says that the notification was sent but it doesn't show on the device!
I read that notifications work on expo go and not apk because of the credentials! did I miss a step or something?
When I go to the expo builds and go to the project credentials Two options pop up, One by the path of com.company.app and the other one : by Legacy ( classic build)!
app.json
{
"expo": {
"name": "myapp",
"slug": "myapp",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"googleServicesFile": "./google-services.json",
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"package": "com.hyrix.myapp",
"useNextNotificationsApi": true
},
"web": {
"favicon": "./assets/favicon.png"
},
"extra": {
"eas": {
"projectId": "ee001501-c3b5-402f-8a1d-914144496965"
}
}
}
}
You could check the Android Studios's logcat after connect your android smartphone to your PC.
I've tried to debug the app in Android Studio's logcat and got the following error message:
'[expo-notifications] Error encountered while updating the device push token with the server:', '{"errors":[{"code":"VALIDATION_ERROR","message":"\"appId\" must be a string.","isTransient":false}]}'
What I did to solve this issue was set "applicationId" manually in the Notifications.getExpoPushTokenAsync() method. Ex:
Notifications.getExpoPushTokenAsync({applicationId: "xxxxxx..."})
The applicationId can be found in app's firebase config as appId.
The method getExpoPushTokenAsync() can receive some parameters, maybe some of them are not being set correctly.

In what situations is it convenient to use an expo:publish to update my app or release a new version?

I've been wondering when it's reasonable to use expo:publish or release a new version.
the question, I have an app in the playstore and they asked me to make some small changes, for example (remove certain images and upload a pdf where those images would be).
in this kind of situation is it enough to use an expo:publish or should I release a new version?
you will need to release a new version as Google Play Console doesn't allow an .aib file when the version is unchanged... Update your version under expo{} and versionCode under android{} in app.json
{
"expo": {
"version": "1.0.5",//Increase this to like 1.0.6
"orientation": "portrait",
"icon": "./assets/",
"backgroundColor" : "#1c1c1c",
"updates": {
"fallbackToCacheTimeout": 0
},
"android": {
"package" : "com.app",
"versionCode": 6,//Increase this to example 7
"permissions": ["ACCESS_FINE_LOCATION"],
"config" : {},
}

read ECONNRESET using expo build

I am building an apk for my application which is built by react native using expo
I use expo build:android command in the terminal and after this I got a prompt to choose from:
? Would you like to upload a keystore or have us generate one for you?
If you don't know what this means, let us handle it! :)
so i choosed that expo will handle it and I got the following steps
Publishing to channel 'default'...
Building iOS bundle
Building Android bundle
Analyzing assets
Uploading assets
Uploading \assets\alert.mp3
Uploading \assets\images\splash.png
Uploading \assets\images\icon.png
and then I got the follwing error
read ECONNRESET
Set EXPO_DEBUG=true in your env to view the stack trace.
I also updated expo-cli to the latest version!
and here is my app.json if it helps
{
"expo": {
"name": "app name",
"slug": "app-name",
"platforms": [
"android"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"scheme": "myapp",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"android": {
"package": "com.el3ameed.appname",
"versionCode": 1,
"adaptiveIcon": {
"foregroundImage": "./assets/images/icon.png",
"backgroundColor": "#171717"
}
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"bundleIdentifier": "com.el3ameed.appname",
"buildNumber": "1.0.0"
},
"description": ""
}
}
I assume you're on Windows because I faced the exact same issue.
So first verify that you've followed the instructions given here:
https://docs.expo.io/versions/latest/distribution/building-standalone-apps/
Especially regarding installing Ubuntu and enabling WSL (in that order).
I was getting this error even after following the instructions so what worked for me was disabling my Windows Firewall. After that it worked like a charm.
Also as a last resort try using a VPN as that worked for me aswell.

Expo. React Native. Deep links do not work on Android

Universal links on iOS work well.
I have an issue with Android.
Please see assetlinks and intentFilters.
I will appreciate any help.
SDK Version: 35.0.0
assetlinks - https://ocov.us/.well-known/assetlinks.json
"intentFilters": [
{
"action": "VIEW",
"autoVerify": true,
"data": {
"scheme": "https",
"host": "*.ocov.us"
},
"category": [
"BROWSABLE",
"DEFAULT"
]
}]
Playing with data.host helped.

Android-TV app shows white screen

I've built an App with react-native and expo. Installed it on my Android-TV and my Android-TV emulator.
The app works when I run it through the ES File Explorer app, however when I try to run it regularly by clicking it on the Android-TV app section I get a constant white screen.
Built the apk with expo through $exp build:android.
App.json code:
{
"expo": {
"name": "CommuniTV",
"description": "The future of watching TV is here!",
"slug": "CommuniTV",
"privacy": "public",
"sdkVersion": "26.0.0",
"platforms": ["ios", "android"],
"version": "1.0.4",
"orientation": "landscape",
"entryPoint": "./App.js",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "project.communiTV.com",
"versionCode": 104,
"permissions": [],
"icon": "./AppIcon.png",
"adaptiveIcon": {
"foregroundImage": "./launcherIcon.png" // size is 1024x1024
}
}
}
}
Couldn't find any solution on the web and I'm stuck.
Any suggestions?
First screenshot - I click here I get a white screen
Second screenshot - I'll start it from here the App works fine
After spending some time looking at the native code I managed to solve this issue by adding the proper configuration to app.json:
"android": {
...
"intentFilters": [
{
"action": "MAIN",
"category": [
"LEANBACK_LAUNCHER"
]
}
]
},
More detailed answer can be found here: https://gist.github.com/miazga/2e6449e0c591e3ac8e22185b2edb447d
As recommended in this thread, Go to File -> Setting -> Build,Execution,Deployment -> Instant Run then uncheck the Enable Instant Run if it is checked, then run the project.
Also from this link, when your app starts, it first uses the theme of the launching activity to display the window background. If you don't specify windowBackground in your styles.xml, the default white will be used, and damage the UX.
Matt's answer seems to be oudated as of now, its throwing build time error while reading manifest.
TypeError: Cannot convert undefined or null to object
at Function.entries (<anonymous>)
at renderIntentFilterDatumEntries (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidIntentFilters.js:33:17)
at /app/turtle/node_modules/#expo/xdl/build/detach/AndroidIntentFilters.js:37:70
at Array.map (<anonymous>)
at renderIntentFilterData (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidIntentFilters.js:37:48)
at /app/turtle/node_modules/#expo/xdl/build/detach/AndroidIntentFilters.js:25:9
at Array.map (<anonymous>)
at renderIntentFilters (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidIntentFilters.js:22:24)
at runShellAppModificationsAsync (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidShellApp.js:632:115)
at async Object.createAndroidShellAppAsync (/app/turtle/node_modules/#expo/xdl/build/detach/AndroidShellApp.js:392:3)
at async runShellAppBuilder (/app/turtle/build/builders/android.js:95:9)
at async Object.buildAndroid [as android] (/app/turtle/build/builders/android.js:43:28)
at async build (/app/turtle/build/jobManager.js:181:33)
at async processJob (/app/turtle/build/jobManager.js:118:32)
at async Object.doJob (/app/turtle/build/jobManager.js:49:5)
at async main (/app/turtle/build/server.js:66:13)
I updated it with data property, now seems to work fine, tested on expo 39 & 40
Also note that you have to include "LAUNCHER" too in category or else some devices may still show white screen.
"intentFilters": [
{
"action": "MAIN",
"data":{},
"category": [
"LEANBACK_LAUNCHER",
"LAUNCHER"
]
}
]

Categories

Resources