HI All,
Here i have copied the code. I am trying to write a code (for
phone automation) using which i want to connect to wireshark and start
taking traces on that.
while the wireshark is running i am doing some activities on phone like
make calls, browse websites etc.
When I am done with that, I want to stop wireshark to take more traces.
The problem in the code below is, with the line in red color. I cannot go
to next step till i dont get out of that line. i.e. if i once start
wireshark traces, it does not stop and if i stop to
go to next step, i cannot capture traces. Please help me to find out any
work around for that. Its ok if i can write wireshark part and other
application activites in two diffrnt methods.
try
{
String line;
File file = new File("C:\\"+filename);
Writer output = new BufferedWriter(new FileWriter(file));
Runtime rt = Runtime.getRuntime() ;
Process p = rt.exec("start /B C:\\Program Files\\Wireshark\\tshark.exe -i 2
-a duration:100");
BufferedReader bri = new BufferedReader (new
InputStreamReader(p.getInputStream()));
while ((line = bri.readLine()) != null)
{
output.append(line);
}
output.close();
bri.close();
//System.out.println("Done.");
p.destroy() ;
//System.out.println("Run");
}
catch(Exception exc)
{
exc.printStackTrace();
System.out.println("Error running wireshark");
}
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en