die Antwort von how to modify the value of the key 'X-requested-with' in the request headers of resource request in Android webview, but not a page request? funktioniert gut, aber ich weiß nicht, wie man weiß, ob der Aufruf der getPackageName() -Methode von Webkit oder nicht kommt. Hier ist mein Code:Ändern getPackageName() in der Anwendung für Webview, funktioniert gut, aber
package com.xxx.xxx;
import android.app.Application;
public class Global extends Application {
private static Global instance;
public Global() {
instance = this;
}
private final String PACKAGE="com.webnews.appdirector";
@Override
public void onCreate() {
super.onCreate();
}
@Override
public String getPackageName() {
return PACKAGE; //this work fine, but how to know if is webkit callback ??? "instance" have mcomponentcallbacks set to webkit, but how to read it ???
}
}
ich mit dem debug „mcomponentcallbacks“ von „Instanz“ tun konnte, war auch auf „WebKit“ aber ich weiß nicht, wie es zu lesen.
Können Sie mir helfen?