getBitmap

fun getBitmap(context: Context, uri: Uri, viewBounds: BrazeViewBounds = BrazeViewBounds.NO_BOUNDS): Bitmap?

Downloads an image from the internet or loads an image locally and returns a bitmap object. This should always be run in a background thread.

Return

A sampled bitmap if the source image is larger than the destination view dimensions.

Parameters

context

Application context.

uri

The uri of the remote image.

viewBounds

The bounds for the destination view.