get Bitmap
fun getBitmap(context: Context, uri: Uri, viewBounds: BrazeViewBounds = BrazeViewBounds.NO_BOUNDS): BitmapAndHeaders
Downloads an image from the internet or loads an image locally and returns a bitmap object along with headers. This should always be run in a background thread.
Return
A BitmapAndHeaders where the bitmap is a sampled bitmap if the source image is larger than the destination view dimensions. The headers are the response headers from the image download. If the image was retrieved from the local URI, the headers will be null.
Parameters
context
Application context.
uri
The uri of the remote image.
view Bounds
The bounds for the destination view.