I have the following code, and I get an error complaining that the bitmap is not initialized
The strange thing is that I only get it on some devices. How should it be initialized in this context, where something will be assigned to it just afterwards?
B4X:
Dim rfl As Reflector
Dim obj As Object
Dim B As Bitmap
obj = rfl.CreateObject("android.media.MediaMetadataRetriever")
rfl.Target = obj
rfl.RunMethod2("setDataSource", vidfile, "java.lang.String")
B = rfl.RunMethod3("getFrameAtTime", 0, "java.lang.long", 3, "java.lang.int")
Dim HV As Int = B.Height 'Error on this line
Dim WV As Int = B.Width
The strange thing is that I only get it on some devices. How should it be initialized in this context, where something will be assigned to it just afterwards?