stealthcopter / AndroidNetworkTools

Set of useful android network tools
Apache License 2.0
1.36k stars 283 forks source link

Ping doesnt work #90

Closed hungdev closed 2 years ago

hungdev commented 2 years ago

[Android] It always returns image Here is my code

                Ping.onAddress("google.com").setTimeOutMillis(1000).doPing(new Ping.PingListener() {
                    @Override
                    public void onResult(PingResult pingResult) {
                        Log.d("hel1", String.valueOf(pingResult));
                    }

                    @Override
                    public void onFinished(PingStats pingStats) {
                        Log.d("hel2", String.valueOf(pingStats));
                    }

                    @Override
                    public void onError(Exception e) {
                        Log.d("hel3", String.valueOf(e));
                    }
                });
hungdev commented 2 years ago

It doesnt work on emulator. It worked on real device.