@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); DownloaderTask task = new DownloaderTask(); task.execute("Param1", "Param2", "etc"); }
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Preserve across reconfigurations setRetainInstance(true); // TODO: Create new DownloaderTask that "downloads" data DownloaderTask downloadTask = new DownloaderTask(); // TODO: Retrieve arguments from DownloaderTaskFragment // Prepare them for use with DownloaderTask. Bundle bundle = this.getArguments(); ArrayList<Integer> resourceIDS = bundle.getIntegerArrayList("friends"); // TODO: Start the DownloaderTask downloadTask.execute(resourceIDS); }