I have an app where there is a login page, and after logging in there is an activity where it shows the Username, a profile picture, and some other strings related to the user, that I get from a firebase database. Should the process of downloading that information be done using AsyncTask?
Asked
Active
Viewed 31 times
0
-
The Firebase Database client already runs all network operations in a [background thread](https://stackoverflow.com/questions/49643226/how-can-i-run-the-same-asynctask-one-after-one-finished/49646158). This means that all operations take place without blocking your main thread. Putting it in an AsyncTask does not give any additional benefits. – Alex Mamo Apr 12 '21 at 09:40
1 Answers
2
No. If you use firebase SDK they delegate job to background thread, so AsyncTask is not necessary.

Eddie Noreaga
- 48
- 2