Android - Trouble Shooting
Network operations (e.g. talking to your server) must run in a separate thread from the main UI thread. That thread will run in background to minimize freezing and crashing.
- put the logic in a
AyncTask(deprecated in API level R)
- use Kotlin coroutines