mardi 28 janvier 2020

Android Get Calling class fields

I have an android application that call my method via DexClassLoader loadClass and invoke().

I need to access the fields of the class that call my method from my method itself.

I managed to get the name of the calling method via the Stack Trace but I already know that so it's not useful and I don't manage to access the class itself from the stack trace, only his name...

Do you have an idea on how could I be able to get the value of the fields of the calling class from the method I control ?

I think there is a Reflection class that could be able to do that in basic java but I can't find something like that on android...

Thanks





Aucun commentaire:

Enregistrer un commentaire