Open aldyjrz opened 6 years ago
It doesn't seem to be a valid hook. Here is an example how it's working:
`@Override public void handleLoadPackage(final XC_LoadPackage.LoadPackageParam lpparam) throws Throwable { XposedBridge.log(LOG_TAG + "Hooking package " + lpparam.packageName);
if (lpparam.packageName.equals("com.myapp.MyActivity")) {
XposedBridge.log("I'm in my app!");
XposedHelpers.findAndHookMethod("com.myapp.MyActivity", lpparam.classLoader, "onCreate", Bundle.class, new XC_MethodHook() {
@Override
protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
super.beforeHookedMethod(param);
XposedBridge.log("My app's MainActivity is starting!");
}
});
}
}`
Aaaand while i was writing this answer I understood what's the problem with my module! Thanks! :D
Unfortunatelly it seems GitHub's "Insert code" is not bug free, but you can have a look at the tutorial here, and if you learned that you can have a look here at the API reference. And here is a tip: if you have some problem you can Google it because SO and GitHub is full of questions and answers about Xposed :D
Hello Xposed / Mr Rovo
I can't hook two application.. this is my example code