qiniu / android-netdiag Goto Github PK
View Code? Open in Web Editor NEWNetwork Diagnosis for Android
License: MIT License
Network Diagnosis for Android
License: MIT License
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 检测 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());
}
}
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?
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();
}
}
});
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.