Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Example of instantiating custom asynchronous task to make network calls
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Instantiate Async task
MyAsync myTask = new MyAsync(this);
//Run the task in an asynchronous way
myTask.execute("https://api.callhub.io/v2/conference/");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment