To check service is foreground