-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AppState change listener don't work when the app starts in [email protected] but work in [email protected] #25204
Comments
I'm using 0.59.4, and it's fine. |
It's not work on my phone. What brand is your mobile phone and what model? |
|
I test it on my phone used 0.59.4, it's also not work. I mean to say AppState change listener only don't work when the app starts. It's work well when the app at background state or active state. If I kill the App and restart the App, the AppState change listener no feedback. I hope that I have already made it clear. |
What happened |
It doesn't work for me either on app start. (on Android, RN 0.59.8, I didn't test on iOS) Until there's a fix, the quick workaround I found was to directly call the AppState native module:
EDIT: (simpler solution)
This is what's written in the docs, I think it's way simpler & safer to use than my solution above haha, I didn't try it though EDIT: it works:
|
Please read https://facebook.github.io/react-native/docs/appstate carefully, and there is a solution to your issue. |
In
[email protected]
, I got the nextAppState is 'active' when the app starts, but in[email protected]
, I got nothing.React Native version:
App1 use
[email protected]
App2 use
[email protected]
Why the AppState change listener don't work when the app starts in
[email protected]
, is that a bug?The text was updated successfully, but these errors were encountered: