I am new to the development of Android applications. I came across a situation where i need to execute a code in a background thread that does not do something with the UI. Based on the result obtained from the background thread I need to display an alert message on the UI. I heard about AsyncTask class which can be used to execute code in background process but in Android documentation i found that it was deprecated from API Level R.
Can you please suggest on how a particular block of code can be executed in background thread? and also based on the result display the alert on the main UI.