Android Question Sending "Me" as parameter to sub in code module (from Activity module)

francoisg

Active Member
Licensed User
Longtime User
Hi,
I am struggling with an issue where I need to send the current Activity object to a sub in a code module. The sub needs to decide to either, finish the current activity and load a new one or ignore the request based on a case statement. How would I go about this - if I do the following the whole thing just crashes horribly!

in code module:
B4X:
sub test(activity as Activity, doClose as Boolean)
  if (doClose) then activity.Finish
end sub

in the activity module:

B4X:
.
.
..test(me, True)

Any help would be appreciated!!!!
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…