BundleCompat

Added in 1.1.0
Deprecated in 1.11.0

class BundleCompat


Helper for accessing features in Bundle.

Summary

Public functions

java-static IBinder?
@ReplaceWith(expression = "bundle.getBinder(key)")
getBinder(bundle: Bundle, key: String?)

This function is deprecated.

Call getBinder directly.

java-static Unit
@ReplaceWith(expression = "bundle.putBinder(key, binder)")
putBinder(bundle: Bundle, key: String?, binder: IBinder?)

This function is deprecated.

Call putBinder directly.

Public functions

getBinder

Added in 1.1.0
Deprecated in 1.11.0
@ReplaceWith(expression = "bundle.getBinder(key)")
java-static fun getBinder(bundle: Bundle, 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.

Returns
IBinder?

The IBinder that was obtained.

putBinder

Added in 1.1.0
Deprecated in 1.11.0
@ReplaceWith(expression = "bundle.putBinder(key, binder)")
java-static fun putBinder(bundle: Bundle, key: String?, 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.