0
是否有可能獲得網站的桌面站點頁面源代替移動網站? 我的代碼:獲取該頁面桌面站點的來源不是移動站點
public void test() {
;
// Instantiate the RequestQueue.
RequestQueue queue = Volley.newRequestQueue(this);
String url = "google.com";
// Request a string response from the provided URL.
button = (TextView) findViewById(R.id.buttoneins);
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
button.setText("Response is: " + response.substring(0,5532));
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
button.setText("That didn't work!");
}
});
// Add the request to the RequestQueue.
queue.add(stringRequest);
}
非常感謝,它工作:) – murph24