Johan Schoeman Expert Licensed User Longtime User Dec 2, 2017 #1 I am using an inline Java code method that expects an Activity to be passed to it. How do I pass the "active" B4A activity to the Java method? Have tried passing "Me" and "Activity" but none seems to work. Always getting a signature mismatch error. Can someone please advise? Need to do a call using the JavaObject library such as for eg: nativeMe.RunMethod("blabla", array(the_b4a_activity")) (please ignore any typos in the above call - posting this from a laptop that is not the one that I use for B4A. Just need to understand how to pass the B4A activity)
I am using an inline Java code method that expects an Activity to be passed to it. How do I pass the "active" B4A activity to the Java method? Have tried passing "Me" and "Activity" but none seems to work. Always getting a signature mismatch error. Can someone please advise? Need to do a call using the JavaObject library such as for eg: nativeMe.RunMethod("blabla", array(the_b4a_activity")) (please ignore any typos in the above call - posting this from a laptop that is not the one that I use for B4A. Just need to understand how to pass the B4A activity)
JordiCP Expert Licensed User Longtime User Dec 2, 2017 #2 This works Code: Dim J as JavaObject J.initializeContext J.RunMethod("mySub",Array(J,myOtherParams)) Upvote 0
Johan Schoeman Expert Licensed User Longtime User Dec 2, 2017 #3 JordiCP said: This works Code: Dim J as JavaObject J.initializeContext J.RunMethod("mySub",Array(J,myOtherParams)) Click to expand... You are so sharp.....! Thanks @JordiCP Upvote 0
JordiCP said: This works Code: Dim J as JavaObject J.initializeContext J.RunMethod("mySub",Array(J,myOtherParams)) Click to expand... You are so sharp.....! Thanks @JordiCP
Johan Schoeman Expert Licensed User Longtime User Dec 2, 2017 #4 JordiCP said: This works Code: Dim J as JavaObject J.initializeContext J.RunMethod("mySub",Array(J,myOtherParams)) Click to expand... Here we go..... https://www.b4x.com/android/forum/threads/take-a-screenshot-with-inline-java-code.86798/ Upvote 0
JordiCP said: This works Code: Dim J as JavaObject J.initializeContext J.RunMethod("mySub",Array(J,myOtherParams)) Click to expand... Here we go..... https://www.b4x.com/android/forum/threads/take-a-screenshot-with-inline-java-code.86798/