{"action":"created","issue":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/3611","labels_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/3611/labels{/name}","comments_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/3611/comments","events_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/3611/events","html_url":"https://github.com/ankidroid/Anki-Android/issues/3611","id":101226917,"number":3611,"title":"How is the method \"loadInBackground() \" called in Class \"CollectionLoader.class\"","user":{"login":"John0079","id":7960973,"avatar_url":"https://avatars.githubusercontent.com/u/7960973?v=3","gravatar_id":"","url":"https://api.github.com/users/John0079","html_url":"https://github.com/John0079","followers_url":"https://api.github.com/users/John0079/followers","following_url":"https://api.github.com/users/John0079/following{/other_user}","gists_url":"https://api.github.com/users/John0079/gists{/gist_id}","starred_url":"https://api.github.com/users/John0079/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/John0079/subscriptions","organizations_url":"https://api.github.com/users/John0079/orgs","repos_url":"https://api.github.com/users/John0079/repos","events_url":"https://api.github.com/users/John0079/events{/privacy}","received_events_url":"https://api.github.com/users/John0079/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-16T02:46:49Z","updated_at":"2015-08-16T03:12:44Z","closed_at":"2015-08-16T03:12:44Z","body":"in the CollectionLoader.class, there is a method named \"loadInBackground()\", i want to know how is the method is called, i have debug about two days, i haven't find where it is called, \r\nby debug and logcat, i found it is called after \"onStart()\" methed of \"DeckPicker.class\", but i cann't comfirm which methed call it.\r\nwait help....."},"comment":{"url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/comments/131484392","html_url":"https://github.com/ankidroid/Anki-Android/issues/3611#issuecomment-131484392","issue_url":"https://api.github.com/repos/ankidroid/Anki-Android/issues/3611","id":131484392,"user":{"login":"timrae","id":2818274,"avatar_url":"https://avatars.githubusercontent.com/u/2818274?v=3","gravatar_id":"","url":"https://api.github.com/users/timrae","html_url":"https://github.com/timrae","followers_url":"https://api.github.com/users/timrae/followers","following_url":"https://api.github.com/users/timrae/following{/other_user}","gists_url":"https://api.github.com/users/timrae/gists{/gist_id}","starred_url":"https://api.github.com/users/timrae/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timrae/subscriptions","organizations_url":"https://api.github.com/users/timrae/orgs","repos_url":"https://api.github.com/users/timrae/repos","events_url":"https://api.github.com/users/timrae/events{/privacy}","received_events_url":"https://api.github.com/users/timrae/received_events","type":"User","site_admin":false},"created_at":"2015-08-16T03:12:44Z","updated_at":"2015-08-16T03:12:44Z","body":"Hi John,\r\n\r\nLoading the `Collection` can take quite a long time, so we start that in a background thread in the `onCreate()` method of most of the Activities via the method `startLoadingCollection()`. When the background thread is finished, the method `onCollectionLoaded()` will be automatically triggered.\r\n\r\nIt's not really necessary to understand the internal workings of the `CollectionLoader` class, but the `loadInBackground()` is a method of the parent class [`AsyncTaskLoader`](http://developer.android.com/reference/android/content/AsyncTaskLoader.html). It is called automatically by the Android framework, and runs in a background thread."}}