Skip to content

Instantly share code, notes, and snippets.

@AliAsadi
Last active February 16, 2021 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AliAsadi/f8a3de5db1b04a076c4c43c15be67f3f to your computer and use it in GitHub Desktop.
Save AliAsadi/f8a3de5db1b04a076c4c43c15be67f3f to your computer and use it in GitHub Desktop.
public class ThreadActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
//...
new DownloadTask().start();
}
private class DownloadTask extends Thread {
@Override
public void run() {
SystemClock.sleep(2000 * 10);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment