Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

I couldn't receive Network Inspection on my app #679

Open
newtestpage opened this issue Mar 31, 2020 · 1 comment
Open

I couldn't receive Network Inspection on my app #679

newtestpage opened this issue Mar 31, 2020 · 1 comment

Comments

@newtestpage
Copy link

newtestpage commented Mar 31, 2020

Hi
I am completely newbie in this section . I wanted to get network inspection on my android app , nut I couldn't . How I can do it properly ?
This is my activity code:

`public class MainActivity extends AppCompatActivity {

OkHttpClient client;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);


    client = new OkHttpClient.Builder()
            .addNetworkInterceptor(new StethoInterceptor())
            .build();


    AsyncTask.execute(new Runnable() {
        @Override
        public void run() {
            try {
                String ali = runLoad("https://www.telewebion.com/live/tv3");
                Log.i("taggg",ali);
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    });



}

public String runLoad(String url) throws IOException {
    Request request = new Request.Builder()
            .url(url)
            .build();

    try (Response response = client.newCall(request).execute()) {
        return response.body().string();
    }
}

}`

I would appreciate it if someone could help me on this case . I just got normal data (webpage source) and nothing more .

@mshenawy22
Copy link

same here

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants