I have written before the method is executed after the hook operation.
Now I want to trigger the hook method in my own interface.
How should I call the hook method
A short example code would be nice :)
Thanks
I have written before the method is executed after the hook operation.
Now I want to trigger the hook method in my own interface.
How should I call the hook method
A short example code would be nice :)
Thanks
Short Answer
You need to call java.lang.reflect.Method.invoke()
Long Answer
I assume you want to call ("invoke") the method you hooked from some other parts of your code.
First you need access to the Member and the Object you want to call the function on.
Code Example -
Note - If you need to pass arguments to the function call, the MethodHookParam object you got in 1 also has those in the args field.
Easier - If the function you want to call is static
If the function is static, you don't need to wait for the callback.
Note - Also, If you are still hooked to that method, your beforeHookedMethod() and afterHookedMethod() will still be called when calling this function. If you dont want these to be called, use XposedBridge.invokeOriginalMethod() instead of Method.invoke() above.