-
Notifications
You must be signed in to change notification settings - Fork 189
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
Server is not alive after iOS device is 'locked' #39
Comments
@DanielHudson - i'm having the same issue. could you share a pull request? or perhaps we could collaborate on this? i was thinking of the same type of work-around. |
Starting the server again when the app becomes active via AppState works well for me. I had to ditch the random port selection since I don't want to update or refresh my webview when the application becomes active again. I guess I could code around this by storing the port number, but for now it's working for me. Unfortunately I'm not familiar with Android enough to make a pull request, I'm also not sure if this is an issue with this package, or the GCDWebServer. (It might not even be an issue!) |
I not sure we there is a way to keep the server going when the phone is locked. |
…bview loading On Android, when we ask for notification permission, app goes to background. This was causing HttpServer to stop (which is an intented behavior futurepress/react-native-static-server#39), but it was stopped during Home webview loading leading to a blank screen. So now, we ask for notification permission before loading a webview.
…bview loading On Android, when we ask for notification permission, app goes to background. This was causing HttpServer to stop (which is an intented behavior futurepress/react-native-static-server#39), but it was stopped during Home webview loading leading to a blank screen. So now, we ask for notification permission before loading a webview.
keepAlive works fine when the app is in the background, however when the device is locked or goes into standby the server is no longer running in the background, or when the app is put into the foreground again.
Not sure if keepAlive is meant to support this or not, I am considering starting the server again manually once the app is 'active' as a work around for now.
The text was updated successfully, but these errors were encountered: