Android Question Passing 2 Params to RunMethod

potman100

Active Member
Licensed User
Longtime User
Hi

Can anyone tell me how to pass 2 Params to the RunMethod.

I have a function

public int android.telephony.TelephonyManager.btSimapConnectSIM(int,android.telephony.BtSimapOperResponse)

I believe that android.telephony.BtSimapOperResponse is a string.

I have :

Dim o As Int
o = "1"
telMgr = GetContext.RunMethod("getSystemService", Array("phone"))
simState = telMgr.RunMethod("btSimapConnectSIM", Array As Object(o))


Just can't work out how to add the second param.

Thanks for any help provided.

Regards

Potman
 

potman100

Active Member
Licensed User
Longtime User
I found another declare

btSimapApduRequest -int:int, java.lang.String, android.telephony.BtSimapOperResponse

So assumed the type BtSimapOperResponse would = java.lang.String

Is there anyway to find out what it is ?

Thanks

Potman
 
Upvote 0

potman100

Active Member
Licensed User
Longtime User
hmm, seem to be doing something.

Well at least it is finding the function.

Can I just ask 1 more question while you hear.

the function

public java.util.List android.telephony.TelephonyManager.getNeighboringCellInfoGemini(int)

Requires a list to be passed, I have tried with the B4A list but it says the list is not Initialized
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
the function

public java.util.List android.telephony.TelephonyManager.getNeighboringCellInfoGemini(int)

Requires a list to be passed
the method expect an int given, not an List. It will RETURN a List.
 
Upvote 0

potman100

Active Member
Licensed User
Longtime User
When I pass a list

B4X:
Dim lst As List 
       lst.Initialize

           o = "0"
           telMgr = GetContext.RunMethod("getSystemService", Array("phone"))
           lst = telMgr.RunMethod("getNeighboringCellInfoGemini", Array (o))
           Log(lst.size)

I get

java.lang.RuntimeException: Object should first be initialized (List).
 
Upvote 0
Top