0
に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?からの答えは正常に動作しますが、私はgetPackageName()メソッドの呼び出しがWebKitのか、いないから来る場合。知っているのか分かりませんここに私のコードは次のとおりです。私は、「インスタンス」のデバッグ「mcomponentcallbacks」で行うことができます変更getPackageName()のWebViewのためのアプリケーション、作業罰金が、
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 ???
}
}
は「WebKitの」上だけでなくでしたが、私はそれを読むのか分かりません。
あなたは私を助けることができますか?スレッドから