Reputation: 1074
Is there any repo or something that can be used to change the splash screen image automatically without doing a release?
For example 1 week I want to display image X and after that I wanna do Y, but Y its also not on the phone so I have to download it from an api and so on.
Upvotes: 0
Views: 440
Reputation: 721
You can use existing npm packages to make splash screens. like react-native-splash-screen
using setTimeout
method
componentDidMount() {
setTimeout(function(){
// place your navigator code here
}, 1000); // update your own time interval value
}
Hope this will help you :) Happy coding!
Upvotes: 0
Reputation: 3479
You can do that by yourself easily. Just write your api and once a week make your app check that endpoint while opening the app. Save the image to the disk of the device then serve your image on the splash screen from the memory of the device.
If you do not want to write your own api, keep some state and persist it. Again once a week check the api you want if there are any new images, if yes download them to your device then serve them.
This is a broad answer for a broad question, but you can achieve what you want with a little bit react(native) and js.
Upvotes: 1