MobileAdsInitProvider

class MobileAdsInitProvider : InternalMobileAdsInitProvider


A android.content.ContentProvider that hooks into the application startup lifecycle to trigger early initialization of the Google Mobile Ads SDK.

Declaring this provider in your app's AndroidManifest.xml allows the Google Mobile Ads SDK to begin initializing essential components in the background as soon as the app process starts. This occurs before MobileAds.initialize is typically called, potentially reducing SDK initialization latency and improving the time to the first ad request.

To enable early initialization, add the following declaration to your AndroidManifest.xml file within the <application> element:

<provider
android:name="com.google.android.libraries.ads.mobile.sdk.MobileAdsInitProvider"
android:authorities="${applicationId}.mobileadsinitprovider"
android:exported="false"
android:initOrder="100" />

Note: android:initOrder is set to 100 so the provider kicks off early in the startup sequence.

Summary

Public constructors

Inherited functions

From android.content.ContentProvider
open Array<ContentProviderResult>
open Array<ContentProviderResult>
open Int
open Bundle?
call(p0: String, p1: String?, p2: Bundle?)
open Bundle?
call(p0: String, p1: String, p2: String?, p3: Bundle?)
open Uri?
ContentProvider.CallingIdentity
open Int
delete(p0: Uri, p1: Bundle?)
open Unit
AttributionSource?
String?
String?
String?
Context?
Array<PathPermission>?
String?
open Array<String>?
open String?
String?
open Uri?
insert(p0: Uri, p1: ContentValues?, p2: Bundle?)
open Boolean
open Unit
open Unit
open Unit
open Unit
open AssetFileDescriptor?
openAssetFile(p0: Uri, p1: String)
open AssetFileDescriptor?
open ParcelFileDescriptor?
openFile(p0: Uri, p1: String)
open ParcelFileDescriptor?
openFile(p0: Uri, p1: String, p2: CancellationSignal?)
ParcelFileDescriptor
open ParcelFileDescriptor
<T : Any> openPipeHelper(
    p0: Uri,
    p1: String,
    p2: Bundle?,
    p3: T?,
    p4: ContentProvider.PipeDataWriter<T>
)
open AssetFileDescriptor?
openTypedAssetFile(p0: Uri, p1: String, p2: Bundle?)
open AssetFileDescriptor?
open Cursor?
query(p0: Uri, p1: Array<String>?, p2: Bundle?, p3: CancellationSignal?)
open Cursor?
query(
    p0: Uri,
    p1: Array<String>?,
    p2: String?,
    p3: Array<String>?,
    p4: String?,
    p5: CancellationSignal?
)
open Boolean
refresh(p0: Uri, p1: Bundle?, p2: CancellationSignal?)
Context
Unit
Unit
Unit
Unit
open Unit
open Uri?
open Int
update(p0: Uri, p1: ContentValues?, p2: Bundle?)
From com.google.android.libraries.ads.mobile.sdk.internal.initialization.InternalMobileAdsInitProvider
open Unit
attachInfo(context: Context, info: ProviderInfo)
open Int
delete(uri: Uri, selection: String?, selectionArgs: Array<String>?)
open String?
getType(uri: Uri)
open Uri?
insert(uri: Uri, values: ContentValues?)
open Boolean
open Cursor?
query(
    uri: Uri,
    projection: Array<String>?,
    selection: String?,
    selectionArgs: Array<String>?,
    sortOrder: String?
)
open Int
update(
    uri: Uri,
    values: ContentValues?,
    selection: String?,
    selectionArgs: Array<String>?
)

Public constructors

MobileAdsInitProvider

MobileAdsInitProvider()