alterntive to async task code example
Example: asynctask android alternative
new Thread(new Runnable() {
@Override
public void run() {
//Do stuff
runOnUiThread(new Runnable() {
@Override
public void run() {
//UI updates
}
});
}
}).start();