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

Can't toast on a thread that has not called Looper.prepare() #668

Open
cristmasbox opened this issue Feb 16, 2024 · 1 comment
Open

Can't toast on a thread that has not called Looper.prepare() #668

cristmasbox opened this issue Feb 16, 2024 · 1 comment

Comments

@cristmasbox
Copy link

I'm working on an app which should download some files, but allways if i try it it gets this Error from the FetchListener:

java.lang.NullPointerException: Can't toast on a thread that has not called Looper.prepare()

I have checked, all inputs aren't null and I can't find a solution.
Can anyone help me?

@tonyofrancis
Copy link
Owner

@cristmasbox Fetch listener methods are called on a background thread for performance reasons. You would need to run any UI logic 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

2 participants