Stay organized with collections
Save and categorize content based on your preferences.
Loader
Load data for your UI that survives configuration changes.
Latest Update |
Stable Release |
Release Candidate |
Beta Release |
Alpha Release |
October 9, 2019 |
1.1.0 |
- |
- |
- |
Declaring dependencies
To add a dependency on Loader, you must add the Google Maven repository to your
project. Read Google's Maven repository
for more information.
Add the dependencies for the artifacts you need in the build.gradle
file for
your app or module:
Groovy
dependencies {
implementation "androidx.loader:loader:1.1.0"
}
Kotlin
dependencies {
implementation("androidx.loader:loader:1.1.0")
}
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have
ideas for improving this library. Please take a look at the
existing issues
in this library before you create a new one. You can add your vote to an existing issue by
clicking the star button.
Create a new issue
See the Issue Tracker documentation
for more information.
Version 1.1.0
Version 1.1.0
October 9, 2019
androidx.loader:loader:1.1.0
is released. Version 1.1.0 contains these commits.
Important changes since 1.0.0
- Default Executor Change: The default Executor for
AsyncTaskLoader
(and, by extension, CursorLoader
) is now AsyncTask.THREAD_POOL_EXECUTOR
rather than a custom Executor.
- Setting a custom Executor: custom implementations of
AsyncTaskLoader
or its subclasses can now override getExecutor()
to set a custom Executor.
Version 1.1.0-rc01
June 5, 2019
androidx.loader:loader:1.1.0-rc01
is released with no changes from 1.1.0-beta01
.
Version 1.1.0-beta01
March 13, 2019
androidx.loader:loader:1.1.0-beta01
is released. The full list of commits included in this version can be found here.
Bug fixes
- Fixed an issue which would cause a
StaleDataException
when restarting loader from onLoadFinished
(b/123922776)
Version 1.1.0-alpha01
December 3, 2018
New features
- Added a
getExecutor()
method to AsyncTaskLoader
to allow you to set a custom Executor (aosp/810773)
Behavior changes
- The default Executor for
AsyncTaskLoader
is now
AsyncTask.THREAD_POOL_EXECUTOR
rather than a custom Executor.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-29 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-29 UTC."],[],[],null,["# Loader\n======\n\n[User Guide](/guide/components/loaders) [Code Sample](https://github.com/android/architecture-components-samples/blob/master/PersistenceContentProviderSample/app/src/main/java/com/example/android/contentprovidersample/MainActivity.java) \nAPI Reference \n[androidx.loader.app](/reference/kotlin/androidx/loader/app/package-summary) \n[androidx.loader.content](/reference/kotlin/androidx/loader/content/package-summary) \nLoad data for your UI that survives configuration changes. \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|-----------------|--------------------------------------------------|-------------------|--------------|---------------|\n| October 9, 2019 | [1.1.0](/jetpack/androidx/releases/loader#1.1.0) | - | - | - |\n\nDeclaring dependencies\n----------------------\n\nTo add a dependency on Loader, you must add the Google Maven repository to your\nproject. Read [Google's Maven repository](/studio/build/dependencies#google-maven)\nfor more information.\n\nAdd the dependencies for the artifacts you need in the `build.gradle` file for\nyour app or module: \n\n### Groovy\n\n```groovy\ndependencies {\n implementation \"androidx.loader:loader:1.1.0\"\n}\n```\n\n### Kotlin\n\n```kotlin\ndependencies {\n implementation(\"androidx.loader:loader:1.1.0\")\n}\n```\n\nFor more information about dependencies, see [Add build dependencies](/studio/build/dependencies).\n\nFeedback\n--------\n\nYour feedback helps make Jetpack better. Let us know if you discover new issues or have\nideas for improving this library. Please take a look at the\n[existing issues](https://issuetracker.google.com/issues?q=componentid:460551%20status:open)\nin this library before you create a new one. You can add your vote to an existing issue by\nclicking the star button.\n\n[Create a new issue](https://issuetracker.google.com/issues/new?component=460551&template=1182829)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nVersion 1.1.0\n-------------\n\n### Version 1.1.0\n\nOctober 9, 2019\n\n`androidx.loader:loader:1.1.0` is released. [Version 1.1.0 contains these commits](https://android.googlesource.com/platform/frameworks/support/+log/5201bd4b76d8abd612c147be0b4993f15ee133e3..5b6a7fdfd9ce612fa52f3fe95a9f9cb84fe9364c/loader).\n\n**Important changes since 1.0.0**\n\n- **Default Executor Change** : The default Executor for `AsyncTaskLoader` (and, by extension, `CursorLoader`) is now `AsyncTask.THREAD_POOL_EXECUTOR` rather than a custom Executor.\n- **Setting a custom Executor** : custom implementations of `AsyncTaskLoader` or its subclasses can now override `getExecutor()` to set a custom Executor.\n\n### Version 1.1.0-rc01\n\nJune 5, 2019\n\n`androidx.loader:loader:1.1.0-rc01` is released with no changes from `1.1.0-beta01`.\n\n### Version 1.1.0-beta01\n\nMarch 13, 2019\n\n`androidx.loader:loader:1.1.0-beta01` is released. The full list of commits included in this version can be found [here](https://android.googlesource.com/platform/frameworks/support/+log/b93a1415db20e4d3789c0f3a116f3d556ee6b603..79285e90f077844e4b3b1a72a4a051389e3c190a/loader).\n\n**Bug fixes**\n\n- Fixed an issue which would cause a `StaleDataException` when restarting loader from `onLoadFinished` ([b/123922776](https://issuetracker.google.com/issues/123922776))\n\n### Version 1.1.0-alpha01\n\nDecember 3, 2018\n\n**New features**\n\n- Added a `getExecutor()` method to `AsyncTaskLoader` to allow you to set a custom Executor ([aosp/810773](https://android-review.googlesource.com/c/platform/frameworks/support/+/810773))\n\n**Behavior changes**\n\n- The default Executor for `AsyncTaskLoader` is now `AsyncTask.THREAD_POOL_EXECUTOR` rather than a custom Executor."]]