Skip to content
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

App doesn't go back to full-screen mode after being running on the background #4

Open
chiechelski opened this issue Jul 10, 2016 · 2 comments

Comments

@chiechelski
Copy link

Hey guys,

Just wondering if you guys know about this issue. Every time I put the app on the background and open it again, it does not come back in full-screen mode.

react fullscreen issue

Any possible fix or workaround for this issue?

Thanks

@aqnaruto
Copy link

aqnaruto commented May 3, 2017

can you post your code?

@EduardoJM
Copy link

This is really a long, long time issue, but, now i have a issue related, and the solution that i found to my code is use the AppState change event to call onFullScreen method when the state of the app is changed to active. Here is my code (using react hooks):

useEffect(() => {
  FullScreen.onFullScreen();

  function _handleAppStateChange(status: AppStateStatus) {
    if (status === 'active') {
      FullScreen.onFullScreen();
    }
  }

  AppState.addEventListener('change', _handleAppStateChange);
  return () => {
    AppState.removeEventListener('change', _handleAppStateChange);
  }
}, []);

This works fine with my problem and my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants