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

Background Thread or NetworkOnMainThreadException? #22

Closed
flavius-mester opened this issue Apr 2, 2016 · 2 comments
Closed

Background Thread or NetworkOnMainThreadException? #22

flavius-mester opened this issue Apr 2, 2016 · 2 comments

Comments

@flavius-mester
Copy link

Do we need to use the channels in a background thread always?

Is there a plan to make its usage safe in activities using listeners and without worrying about NetworkOnMainThreadException?

I recently got NetworkOnMainThreadException when switching to SSL endpoint. I digged a bit and found it coming from okhttp. Pretty much same issue as here square/okhttp#2017

@snowdevman
Copy link

I also have similar issue. Have you solved this problem?

@bryanjos
Copy link
Collaborator

I think the advice given in the linked issue for okhttp is the correct advice and should be applied here. Network activity on Android should not be done on the main thread.

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