Android Question Check what called a class method

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi all.

I have a class in my app clsCrypt that does encryption/decryption that can be called from the different places. Is it possible to check what called this class methods.

For example I have 2 activities and another class from where I call clsCrypt class methods.

Can I check inside clsCrypt class method what called this method? Or do I need to use some global variable and check this variable every time this class method executed?

Thanks.
 

Peter Simpson

Expert
Licensed User
Longtime User
@Alex_197 A global variable is not really needed. You could always use some sort of 'FromModule' variable in your clsCrypt sub signature, something like the attached file.
 

Attachments

  • FromModuleName.zip
    10.4 KB · Views: 221
Upvote 0
Top