Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants