Hi
I have defined a class using JavaObject and it has inlive java code. In my activity I define and initialize the class then call a method from it. It gives an error. Is it possible to do this?
In my Activity
and then
This last code fails with an error that says getBubbleBitmap method does not exist in my activity. Is there a way around to fixing this so that my class sees my activity?
Thanks.
I have defined a class using JavaObject and it has inlive java code. In my activity I define and initialize the class then call a method from it. It gives an error. Is it possible to do this?
B4X:
'Class module
Sub Class_Globals
Dim nativeMe As JavaObject
End Sub
'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize
nativeMe.InitializeContext
End Sub
Sub getHexagonShape(bmp As Bitmap) As Bitmap
Dim bm As Bitmap
bm = nativeMe.RunMethod("getHexagonShape",Array(bmp))
Return bm
End Sub
In my Activity
B4X:
Private mImages As MashImages
mImages.Initialize
and then
B4X:
imgPerson.Bitmap = mImages.getHexagonShape(modMashiane.Getbitmap(face))
This last code fails with an error that says getBubbleBitmap method does not exist in my activity. Is there a way around to fixing this so that my class sees my activity?
Thanks.