read image from assets folder / sub package android studio kotlin

701 views Asked by At

I have a situation where I need to read an image file (jpg) in a submodule. The class where I need access to that image is a normal class. So I have two options.

  1. I put that image in the asset folder and try to use assetManager, which doesn't work because I don't have context. My project doesn't have any activity or fragment, because it's a submodule

  2. I put that image in a package. How can I access that image?

The code was written in kotlin.

I will be appreciated any help or suggestions

0

There are 0 answers