Google this week deprecated the AsyncTask API found in Android. The API, part of Android for ages, helped synchronize network requests with and match them to the user interface on Android smartphones and tablets. The company did not provide a reason for deprecating the API, though it has long since been matched by other tools.
It has been some time since Google updated the API or altered its functionality. The company made the change through a commit in the Android Open Source Project, where it was spotted by XDA-Developers. The change should not impact end-users, though developers will have to make sure they put the other options to use. In other words, time to update your code.
Alternatives include RxJava and Kotlin via the Coroutines library. Google suggested that developers pick one of these to synchronize network requests with the UI. Google has been pushing Kotlin heavily since Google I/O earlier this year.
What’s not clear is how quickly the change will be implemented within Android itself. XDA suggests that it will at the very least be part of Android 11, which might arrive as soon as March. However, a maintenance or other 10.x update to Android could also introduce it to the base code. In other words, it’ll be best to make the needed updates sooner rather than later.
Go to Source
Author: <a href="https://www.programmableweb.com/user/%5Buid%5D">EricZeman</a>