P potman100 Active Member Licensed User Longtime User Sep 3, 2015 #1 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
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
Erel B4X founder Staff member Licensed User Longtime User Sep 3, 2015 #2 Passing two parameters is simple: Code: Copy jo.RunMethod("someMethod", Array (FirstParam, SecondParam)) The problem here is that you need to understand what is android.telephony.BtSimapOperResponse. It is not a string. It is a type. Maybe it is an enum. Upvote 0
Passing two parameters is simple: Code: Copy jo.RunMethod("someMethod", Array (FirstParam, SecondParam)) The problem here is that you need to understand what is android.telephony.BtSimapOperResponse. It is not a string. It is a type. Maybe it is an enum.
P potman100 Active Member Licensed User Longtime User Sep 3, 2015 #3 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
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
Erel B4X founder Staff member Licensed User Longtime User Sep 3, 2015 #4 The type is: android.telephony.BtSimapOperResponse Try to pass Null and see what happens. Upvote 0
P potman100 Active Member Licensed User Longtime User Sep 3, 2015 #5 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
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
DonManfred Expert Licensed User Longtime User Sep 3, 2015 #6 potman100 said: the function public java.util.List android.telephony.TelephonyManager.getNeighboringCellInfoGemini(int) Requires a list to be passed Click to expand... the method expect an int given, not an List. It will RETURN a List. Upvote 0
potman100 said: the function public java.util.List android.telephony.TelephonyManager.getNeighboringCellInfoGemini(int) Requires a list to be passed Click to expand... the method expect an int given, not an List. It will RETURN a List.
P potman100 Active Member Licensed User Longtime User Sep 3, 2015 #7 When I pass a list Code: Copy 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
When I pass a list Code: Copy 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).