the answer from 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? works fine but I do not know how to know if the call of getPackageName() method comes from webkit or not. Here is my code:
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 ???
}
}
I could do with the debug "mcomponentcallbacks" of "instance" was well on "webkit" but I do not know how to read it.
Can you help me ?