qiang Migic

Greenhorn
+ Follow
since Feb 27, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by qiang Migic

Android does not directly support GIF format picture。but,I want load the url of GIF.and play it .please help me.thank you .oh i already use a GifView.jar However, it does not work sometimes。
8 years ago
Yes, I was reading open source project connectbot.
However, it is a bit difficult, I have yet to understand. So I want to ask friends to read.
9 years ago
In android on how to achieve the ssh client?
How do I get the verified host RSA key and Using algorithm?
Please give me some ideas Or A simple example
I would be grateful!!!
9 years ago
OK ,you are right ,I understand what you said.
But ,There is a problem you may not know.
After my test, android could support the ping command.
But this command in android has some problems
for example:
1 . String strCmd ="ping -c 1 -w 100 ";
if the IP is wrong,( 192.168.6.1) it will be long time to return the results.That is very bad experience.
2 I changed to String cmdString ="ping -c 1 -w 2 -i 1 ";
IP test normal 。but if the DNS(www.yahoo.com) is inexistence (like ljfjdlas.fjdsla) android Still can ping pass.

so you told me use the (ping and TTL++ )to realize the problem.We must first solve the function of ping.
9 years ago
in java I call the code below:
public static void main(String[] args) {

trancert("www.yahoo.com");
}
public static String trancert(String ip){
StringBuffer sb =new StringBuffer();
String cmdString ="tracert -h 10 ";
java.lang.Process progress = null;
BufferedReader br = null;
String s= "";
try {
progress = Runtime.getRuntime().exec(cmdString +ip);
InputStream in = progress.getInputStream();

br = new BufferedReader(new InputStreamReader(in));
while( (s =br.readLine() )!= null){
sb.append(s);
System.out.println(s);
}
} catch (IOException e) {
e.printStackTrace();
}
finally{
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return sb.toString();
}
This code can be normal operation.

but in android I use String cmdString ="tracert -h 10 "; or String cmdString ="traceroute -h 10 "; it doesn't work.
I capture the Exception is "working directory:null Environment: null".
I'd like to run on all mobile phones Including no root of mobile phone.

9 years ago
how to realize ping, tracert and DNS in Android?
Please help me .thank you!!
or you can tell me what technology you use it?
jni + ndk or Runtime.getRuntime (). exec (cmdString);
I will be grateful!
9 years ago