Google is committed to advancing racial equity for Black communities. See how.

BundleCompat

class BundleCompat
kotlin.Any
   ↳ androidx.core.app.BundleCompat

Helper for accessing features in Bundle.

Summary

Public methods

static IBinder?
getBinder(@NonNull bundle: Bundle, @Nullable key: String?)

A convenience method to handle getting an IBinder inside a Bundle for all Android versions.

static Unit
putBinder(@NonNull bundle: Bundle, @Nullable key: String?, @Nullable binder: IBinder?)

A convenience method to handle putting an IBinder inside a Bundle for all Android versions.

Public methods

getBinder

@Nullable static fun getBinder(
    @NonNull bundle: Bundle,
    @Nullable key: String?
): IBinder?

A convenience method to handle getting an IBinder inside a Bundle for all Android versions.

Parameters
bundle Bundle: The bundle to get the IBinder.
key String?: The key to use while getting the IBinder.
Return
IBinder? The IBinder that was obtained.

putBinder

static fun putBinder(
    @NonNull bundle: Bundle,
    @Nullable key: String?,
    @Nullable binder: IBinder?
): Unit

A convenience method to handle putting an IBinder inside a Bundle for all Android versions.

Parameters
bundle Bundle: The bundle to insert the IBinder.
key String?: The key to use while putting the IBinder.
binder IBinder?: The IBinder to put.