I am developing an app in react-native.
Whenever I start the app I am getting the below screen as the start screen.
Any idea how can I remove it?
I am new to the react-native world. Any help is highly appreciated.
This screen lets your app stay up and running without delays
If you allocate to give it up
You need to change this on Android and iOS separately
For Android - https://stackoverflow.com/a/44380138/9161478
For iOS - https://stackoverflow.com/a/34073928/9161478
Related
Problem: I need a way to measure if the screen is locked/unlocked while my app is running in the background.
What I have tried: Using React Native's App State, I can measure if the App is active, but there is no differentiation between the App being in the background or the screen is locked.
I have found this duplicate, however since there has been no solution given I have opened a new question.
I'm looking for a solution for Android.
When your application is in the background, the process running React Native is paused. You cannot manage your event from inside your application.
The only solution is to use headless js.
When I move my React native app to background irrespective on which screen I am on, it shows white screen instead of the screen I should be in? I am not talking about the white splash screen.
This issue happens only on android and not on iOS
https://preview.redd.it/yhalbullg3b61.jpg?width=720&format=pjpg&auto=webp&s=a690d3470b7923d8de64d38fa335d86257fd6612
I am using React Navigation. I am not even sure what code to post or where to look for debugging.
I also tried with release mode apk but the issue persists for android.
This was not React-Native specific issue. I have set FLAG_SECURE in android for one of my Native module. Removing it resolved this issue
In our React Native app, there seem to be different loading stages the app goes through. Generally, when opening from the homescreen:
1) The Launch Image displays. This seems to wait around until the native app has booted up
2) There is a full-screen white flash while React Native loads the components on the screen (I assume)
3) The app content starts loading (e.g. starts showing the loading spinners etc you have built into your components)
Step 2 feels a little glitchy. Is there a way of smoothing this out? Ideally it would be great to tell the native layer to only stop showing the launch image once your components have 'initialised' - is this possible?
Otherwise, are there any better ways of dealing with this? I notice other (usually native) apps usually don't behave this way.
Was facing same issue, initially added native background color to the android activity to sort this out but it wasn't the best solution since i had multi shaded background therefore shifted to react-native-splash-screen
On which platform are you launching the app, iOS or Android?
In both cases there is a native background color on which the components are drawn. For example on Android the MainActivity's theme specified in the manifest determines the activity's background. This could explain the white flash in case you're running on Android.
I need to make my air app to disappear when I press a button or to run in background for about 5 seconds and close it after that.
How can I do this? thank you very much!
You cannot force close your AIR app by simply calling
NativeApplication.nativeApplication.exit()
That doesn't work in AIR. For that you will have to write a simple ANE and call android code to exit application. We also forced closed our AIR android app by ANE.
I don't believe it's possible to control if your app is visible, the android OS controls that.
You can detect if your app is about to be suspended by listening for the Event.DEACTIVATE from the NativeApplication.nativeApplication object.
You can close your app with NativeApplication.nativeApplication.exit(), however it wont be a "background" process.
i have a Phonegap and JQM app.
Problem is, if I switch to another app and then back to my app, App is completely reloaded and start again.
Is posible this disable?
Thanks for any advice.
This is happening because there is a lack of memory for the app to run. So as soon as u go to home the app dies and on opening again it reloads the app from the start. To confirm that this is indeed happening i would suggest that you close all running apps on your phone and then run your app. Im sure it would run properly even after switching to home screen and coming back.I don't think its possible to get around this behavior. Design your app so that it has a small startup time so that its usable even on phones with less ram where such problems would come.