0

I added java library to my project. now I want to use Reflector lib to call an static method of the added java library.

The way this method is called in java lib was:

Adad.setTestMode(true);

Now I am wondering how I could call this method in B4A. As Much as I know I should write something like this:

Dim r As Reflector
r.RunStaticMethod("ir.adad.Adad" , "setTesMode" , ??? , Null)

But I don't know what to put instead of ??? in the above statement.

Waldir Leoncio
  • 10,853
  • 19
  • 77
  • 107
Elnaz
  • 1
  • 1

1 Answers1

0

Unfortunately as B4A forum guys only respond to paid members questions, I had to figure out the solution myself:

Dim args1(1) As Object
args1(0) = True 
Dim types(1) As String
types(0) = "java.lang.boolean"

Dim r As Reflector  
r.RunStaticMethod("ir.adad.Adad" , "setTestMode" , args1 ,  types) 
Elnaz
  • 1
  • 1