privateclass MyAsyncData extends AsyncTask<String, Void, String> { @Override protectedvoid onPreExecute() { // Write your code which run first // This code execute first // You can show Process dialog. } @Override protected String doInBackground(String... urls) { // write your code which you perform task in background. returnnull; } @Override protectedvoid onPostExecute(String result) { // write your code which you perform task in after doInBackground() } }
Call Async type class
MyAsyncData task = new MyAsyncData(); task.execute(new String[] { "Sample" });
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
Create class and extends with AsyncTask
Call Async type class