Closed maniac103 closed 8 years ago
I'm presuming this works although I'm worried about NPEs when the activity is rotated because the connection to the service will be lost.
Yeah, it will be lost and restarted - but both the activity and the fragment are recreated anyway. I just tried explicitly testing rotation again, it was fine.
Stop making the service run permanently, even if not connected to any server. Now, the service runs only if either a server is connected or the main activity is running.