Network Monitoring

by blues » Wed, 29 Oct 2008 14:16:28 GMT

Sponsored Links
 Is there a way to monitor the IP traffic? For example throughput?
If not in java, can it be done through native code? I have seen some
IP sniffer source code for linux.

Network Monitoring

by brs » Wed, 29 Oct 2008 19:34:53 GMT

 You could try to read


to get interface and protocol level stats. I guess since this is not
part of the public API, there is not guarantee that these formats
won't change, but for now at least this information might be what you
are looking for.



Sponsored Links

Network Monitoring

by blues » Thu, 30 Oct 2008 02:57:18 GMT

 Can we read from Java? Any permission is required?



Network Monitoring

by brs » Thu, 30 Oct 2008 12:01:29 GMT

 No special permissions needed as far as I know - just read them like a
regular file. For example, I was using code like this for a prototype
network monitoring app (I am no java expert - this is mostly cut &

FileReader fstream;
try {
 fstream = new FileReader("/proc/self/net/dev");
} catch (FileNotFoundException e) {
BufferedReader in = new BufferedReader(fstream, 500);
String line;
try {
 while ((line = in.readLine()) != null) {



Other Threads

1. Block camera capture on Android

Hi All,

Is it possible to write an application to prevent the Android handset
from storing the capture picture? My thoughts are
a. Hook onto native camera apps and monitor for camera capture (or
events). Once there is a capture event, my application will be able to
detect and maybe remove the capture picture
b. Continously monitor camera capture picture storage. Are there any
known i/o api l can use to do this?
c. Prevent all writes to the OS. Possible?

Thanks for all the feedback in advance!


2. Routing and the Maps TOS

In the Google Maps TOS it says that you can't use it for route
guidance.  Does anyone know if displaying a line on a
MyLocationOverlay indicating a route would count as route guidance?
It's not real time guidance, but the map is synchronized to the user's
position.  Has anyone done this?

3. TableLayout possibly flawed in API Level 5, AVD 2.0

4. Exiting an onDraw()

5. Paid apps not visible again after Eris upgrade Sunday

6. Breaking News: The Market Still Needs Fixing...

7. MMS receiving/sending