# InitializationProvider

Artifact: [androidx.startup:startup-runtime](https://developer.android.com/jetpack/androidx/releases/startup) [View Source](https://cs.android.com/search?q=file:androidx/startup/InitializationProvider.java+class:androidx.startup.InitializationProvider) Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/startup#1.1.0)

*** ** * ** ***


```
public class InitializationProvider extends ContentProvider
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [android.content.ContentProvider](https://developer.android.com/reference/android/content/ContentProvider.html) ||
|   | ↳ | [androidx.startup.InitializationProvider](https://developer.android.com/reference/androidx/startup/InitializationProvider) |

*** ** * ** ***

The `https://developer.android.com/reference/android/content/ContentProvider.html` which discovers `https://developer.android.com/reference/androidx/startup/Initializer`s in an application and initializes them before `https://developer.android.com/reference/android/app/Application.html#onCreate()`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/startup/InitializationProvider#InitializationProvider()()` |

| ### Public methods |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/startup/InitializationProvider#delete(android.net.Uri,java.lang.String,java.lang.String[])( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html selection, @https://developer.android.com/reference/androidx/annotation/Nullable String[] selectionArgs )` |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/startup/InitializationProvider#getType(android.net.Uri)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri)` |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/startup/InitializationProvider#insert(android.net.Uri,android.content.ContentValues)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/content/ContentValues.html values)` |
| `final boolean` | `https://developer.android.com/reference/androidx/startup/InitializationProvider#onCreate()()` |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/database/Cursor.html` | `https://developer.android.com/reference/androidx/startup/InitializationProvider#query(android.net.Uri,java.lang.String[],java.lang.String,java.lang.String[],java.lang.String)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, @https://developer.android.com/reference/androidx/annotation/Nullable String[] projection, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html selection, @https://developer.android.com/reference/androidx/annotation/Nullable String[] selectionArgs, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html sortOrder )` |
| `final int` | `https://developer.android.com/reference/androidx/startup/InitializationProvider#update(android.net.Uri,android.content.ContentValues,java.lang.String,java.lang.String[])( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html uri, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/android/content/ContentValues.html values, @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html selection, @https://developer.android.com/reference/androidx/annotation/Nullable String[] selectionArgs )` |

| ### Inherited Constants |
|---|
| From [android.content.ComponentCallbacks2](https://developer.android.com/reference/android/content/ComponentCallbacks2.html) |---|---| | `static final int` | `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_BACKGROUND = 40` | | `static final int` | `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_COMPLETE = 80` **This field is deprecated.** | | `static final int` | `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_MODERATE = 60` **This field is deprecated.** | | `static final int` | `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_CRITICAL = 15` **This field is deprecated.** | | `static final int` | `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_LOW = 10` **This field is deprecated.** | | `static final int` | `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_RUNNING_MODERATE = 5` **This field is deprecated.** | | `static final int` | `https://developer.android.com/reference/android/content/ComponentCallbacks2.html#TRIM_MEMORY_UI_HIDDEN = 20` | |

| ### Inherited methods |
|---|
| From [android.content.ContentProvider](https://developer.android.com/reference/android/content/ContentProvider.html) |---|---| | `ContentProviderResult[]` | `https://developer.android.com/reference/android/content/ContentProvider.html#applyBatch(java.lang.String, java.util.ArrayList&lt;android.content.ContentProviderOperation&gt;)( https://developer.android.com/reference/java/lang/String.html authority, https://developer.android.com/reference/java/util/ArrayList.html<https://developer.android.com/reference/android/content/ContentProviderOperation.html> operations )` | | `void` | `https://developer.android.com/reference/android/content/ContentProvider.html#attachInfo(android.content.Context, android.content.pm.ProviderInfo)(https://developer.android.com/reference/android/content/Context.html context, https://developer.android.com/reference/android/content/pm/ProviderInfo.html info)` | | `int` | `https://developer.android.com/reference/android/content/ContentProvider.html#bulkInsert(android.net.Uri, android.content.ContentValues[])(https://developer.android.com/reference/android/net/Uri.html uri, ContentValues[] values)` | | `https://developer.android.com/reference/android/os/Bundle.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#call(java.lang.String, java.lang.String, android.os.Bundle)(https://developer.android.com/reference/java/lang/String.html method, https://developer.android.com/reference/java/lang/String.html arg, https://developer.android.com/reference/android/os/Bundle.html extras)` | | `https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#canonicalize(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html url)` | | `final https://developer.android.com/reference/android/content/ContentProvider.CallingIdentity.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#clearCallingIdentity()()` | | `int` | `https://developer.android.com/reference/android/content/ContentProvider.html#delete(android.net.Uri, android.os.Bundle)(https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/android/os/Bundle.html extras)` | | `void` | `https://developer.android.com/reference/android/content/ContentProvider.html#dump(java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[])(https://developer.android.com/reference/java/io/FileDescriptor.html fd, https://developer.android.com/reference/java/io/PrintWriter.html writer, String[] args)` | | `final https://developer.android.com/reference/android/content/AttributionSource.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#getCallingAttributionSource()()` | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#getCallingAttributionTag()()` | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#getCallingPackage()()` | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#getCallingPackageUnchecked()()` | | `final https://developer.android.com/reference/android/content/Context.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#getContext()()` | | `final PathPermission[]` | `https://developer.android.com/reference/android/content/ContentProvider.html#getPathPermissions()()` | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#getReadPermission()()` | | `String[]` | `https://developer.android.com/reference/android/content/ContentProvider.html#getStreamTypes(android.net.Uri, java.lang.String)(https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/java/lang/String.html mimeTypeFilter)` | | `https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#getTypeAnonymous(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html uri)` | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#getWritePermission()()` | | `boolean` | `https://developer.android.com/reference/android/content/ContentProvider.html#isTemporary()()` | | `void` | `https://developer.android.com/reference/android/content/ContentProvider.html#onCallingPackageChanged()()` | | `void` | `https://developer.android.com/reference/android/content/ContentProvider.html#onConfigurationChanged(android.content.res.Configuration)(https://developer.android.com/reference/android/content/res/Configuration.html newConfig)` | | `void` | `https://developer.android.com/reference/android/content/ContentProvider.html#onLowMemory()()` **This method is deprecated.** | | `void` | `https://developer.android.com/reference/android/content/ContentProvider.html#onTrimMemory(int)(int level)` | | `https://developer.android.com/reference/android/content/res/AssetFileDescriptor.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#openAssetFile(android.net.Uri, java.lang.String)(https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/java/lang/String.html mode)` | | `https://developer.android.com/reference/android/os/ParcelFileDescriptor.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#openFile(android.net.Uri, java.lang.String)(https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/java/lang/String.html mode)` | | `final https://developer.android.com/reference/android/os/ParcelFileDescriptor.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#openFileHelper(android.net.Uri, java.lang.String)(https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/java/lang/String.html mode)` | | `https://developer.android.com/reference/android/os/ParcelFileDescriptor.html` | `<T> https://developer.android.com/reference/android/content/ContentProvider.html#openPipeHelper(android.net.Uri, java.lang.String, android.os.Bundle, T, android.content.ContentProvider.PipeDataWriter&lt;T&gt;)( https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/java/lang/String.html mimeType, https://developer.android.com/reference/android/os/Bundle.html opts, T args, https://developer.android.com/reference/android/content/ContentProvider.PipeDataWriter.html<T> func )` | | `https://developer.android.com/reference/android/content/res/AssetFileDescriptor.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#openTypedAssetFile(android.net.Uri, java.lang.String, android.os.Bundle)(https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/java/lang/String.html mimeTypeFilter, https://developer.android.com/reference/android/os/Bundle.html opts)` | | `https://developer.android.com/reference/android/database/Cursor.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#query(android.net.Uri, java.lang.String[], android.os.Bundle, android.os.CancellationSignal)( https://developer.android.com/reference/android/net/Uri.html uri, String[] projection, https://developer.android.com/reference/android/os/Bundle.html queryArgs, https://developer.android.com/reference/android/os/CancellationSignal.html cancellationSignal )` | | `boolean` | `https://developer.android.com/reference/android/content/ContentProvider.html#refresh(android.net.Uri, android.os.Bundle, android.os.CancellationSignal)(https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/android/os/Bundle.html extras, https://developer.android.com/reference/android/os/CancellationSignal.html cancellationSignal)` | | `final https://developer.android.com/reference/android/content/Context.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#requireContext()()` | | `final void` | `https://developer.android.com/reference/android/content/ContentProvider.html#restoreCallingIdentity(android.content.ContentProvider.CallingIdentity)(https://developer.android.com/reference/android/content/ContentProvider.CallingIdentity.html identity)` | | `final void` | `https://developer.android.com/reference/android/content/ContentProvider.html#setPathPermissions(android.content.pm.PathPermission[])(PathPermission[] permissions)` | | `final void` | `https://developer.android.com/reference/android/content/ContentProvider.html#setReadPermission(java.lang.String)(https://developer.android.com/reference/java/lang/String.html permission)` | | `final void` | `https://developer.android.com/reference/android/content/ContentProvider.html#setWritePermission(java.lang.String)(https://developer.android.com/reference/java/lang/String.html permission)` | | `void` | `https://developer.android.com/reference/android/content/ContentProvider.html#shutdown()()` | | `https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/android/content/ContentProvider.html#uncanonicalize(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html url)` | | `int` | `https://developer.android.com/reference/android/content/ContentProvider.html#update(android.net.Uri, android.content.ContentValues, android.os.Bundle)(https://developer.android.com/reference/android/net/Uri.html uri, https://developer.android.com/reference/android/content/ContentValues.html values, https://developer.android.com/reference/android/os/Bundle.html extras)` | |

## Public constructors

### InitializationProvider

Added in 1.1.0

```
public InitializationProvider()
```

## Public methods

### delete

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/startup#1.1.0)

```
public final int delete(
    @NonNull Uri uri,
    @Nullable String selection,
    @Nullable String[] selectionArgs
)
```

### getType

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/startup#1.1.0)

```
public final @Nullable String getType(@NonNull Uri uri)
```

### insert

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/startup#1.1.0)

```
public final @Nullable Uri insert(@NonNull Uri uri, @Nullable ContentValues values)
```

### onCreate

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/startup#1.1.0)

```
public final boolean onCreate()
```

### query

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/startup#1.1.0)

```
public final @Nullable Cursor query(
    @NonNull Uri uri,
    @Nullable String[] projection,
    @Nullable String selection,
    @Nullable String[] selectionArgs,
    @Nullable String sortOrder
)
```

### update

Added in [1.1.0](https://developer.android.com/jetpack/androidx/releases/startup#1.1.0)

```
public final int update(
    @NonNull Uri uri,
    @Nullable ContentValues values,
    @Nullable String selection,
    @Nullable String[] selectionArgs
)
```