GithubHelp home page GithubHelp logo

android-netdiag's People

Contributors

longbai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-netdiag's Issues

Layout

sorry for my ignorance, but where is the file layout, I tried to create a new app using its codes but it went wrong, I would if possible the complete app file with layout to be able to modify

thank you

TraceRoute.Result append NullPointerException

TraceRoute 检测 unknown host 会报出空指针异常,解决方式是 :
private void updateOut(String str) {
//添加 null 判断
if(result !=null){
result.append(str);
}
}

private void printNormal(Matcher m, long time, StringBuilder lineBuffer) {
if(result !=null){
result.append(lineBuffer.toString());
}
}

can i use direct ip rather then domain name

This library very useful to me thanks .
i have one little query can i use direct ip address like 8.8.8.8 rather then domain name ?
i had tried but i am getting no host found a exception.

is there any solution for that?

Crash : Trace Route Null pointer exception in case of wrong url

Hello,
I am getting null pointer exception while performing Traceroute in case of wrong url.
java.net.UnknownHostException: Unable to resolve host "apibroken.apc.com": No address associated with hostname
at java.net.InetAddress.lookupHostByName(InetAddress.java:424)
at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
at java.net.InetAddress.getByName(InetAddress.java:289)
at com.qiniu.android.netdiag.TraceRoute.getIp(TraceRoute.java:76)
08-07 14:31:50.568 16689-16704/com.example.harshgaba.netdialogsample W/System.err: at com.qiniu.android.netdiag.TraceRoute.run(TraceRoute.java:158)
at com.qiniu.android.netdiag.TraceRoute.access$000(TraceRoute.java:16)
at com.qiniu.android.netdiag.TraceRoute$1.run(TraceRoute.java:63)
at java.lang.Thread.run(Thread.java:841)
Caused by: libcore.io.GaiException: getaddrinfo failed: EAI_NODATA (No address associated with hostname)
at libcore.io.Posix.getaddrinfo(Native Method)
at libcore.io.ForwardingOs.getaddrinfo(ForwardingOs.java:61)
at java.net.InetAddress.lookupHostByName(InetAddress.java:405)
08-07 14:31:50.569 16689-16704/com.example.harshgaba.netdialogsample W/System.err: ... 7 more
08-07 14:31:50.569 16689-16704/com.example.harshgaba.netdialogsample W/dalvikvm: threadid=12: thread exiting with uncaught exception (group=0x2ccf2ba8)
08-07 14:31:50.570 16689-16704/com.example.harshgaba.netdialogsample E/AndroidRuntime: FATAL EXCEPTION: Thread-139
Process: com.example.harshgaba.netdialogsample, PID: 16689
java.lang.NullPointerException
at com.qiniu.android.netdiag.TraceRoute$Result.access$100(TraceRoute.java:210)
at com.qiniu.android.netdiag.TraceRoute.updateOut(TraceRoute.java:151)
at com.qiniu.android.netdiag.TraceRoute.run(TraceRoute.java:161)
at com.qiniu.android.netdiag.TraceRoute.access$000(TraceRoute.java:16)
at com.qiniu.android.netdiag.TraceRoute$1.run(TraceRoute.java:63)
at java.lang.Thread.run(Thread.java:841)

------------------->>>> Below implemented code <<<---------------------

TraceRoute.start("apibroken.apc.com", new Output() {
@OverRide
public void write(String line) {
Log.e("TraceRoute:-- ", line + " ");
}
}, new TraceRoute.Callback() {
@OverRide
public void complete(TraceRoute.Result r) {
try {
Log.e("TraceRoute:-- ", " r.content() " + r.content() + " " + r.ip);
} catch (Exception e) {
e.printStackTrace();
}

        }

    });

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.