So i have a method, for example:
fun getBitmap(...): Bitmap? {
//.. come code
return result // this is a Bitmap? - nullable bitmap.
}
When i call this method from Java using the file name, BitmapUtilsKt.getBitmap() it returns always null, even when in debug mode on the return line the result was not null.
So, seems that there is a problem converting nullable Bitmap to java’s not nullable Bitmap, that always results in null.
Is this a bug? How do i continue working with this code? Making the method return not nullable Bitmap seems impossible for me now. As i understand, java should receive the Bitmap from this method successfully.