hook Method
Hook a Java method by providing the target method together with the context object owner and its callback replacement.
Return
If the hook succeed, true, otherwise false.
See also
Parameters
The hooker object to store the context of the hook. Null if replacement is static. The most likely usage is, in Xposed framework, multiple modules can hook the same Java method and the owner can be used to store all the callbacks to allow multiple modules work simultaneously without conflict.
The method you want to hook. Must not be null.
The callback method to the owner object is used to replace the target method. Whenever the target method is invoked, the replacement method will be invoked instead of the original target method. The return type must be the same as the original method and the parameter type must be Hooker.MethodCallback.
Hook a Java method by providing the target method together with its callback replacement.
Return
If the hook succeed, true, otherwise false.
See also
Parameters
The method you want to hook. Must not be null.
The callback method is used to replace the target method. Whenever the target method is invoked, the replacement method will be invoked instead of the original target method.