Showing posts with label networking. Show all posts
Showing posts with label networking. Show all posts

November 21, 2010

[SOLVED] How to check internet access on Android?

You can use
Context.getSystemService(Context.CONNECTIVITY_SERVICE).getNetworkInfo(ConnectivityManager.TYPE_MOBILE)

or
Context.getSystemService(Context.CONNECTIVITY_SERVICE).getNetworkInfo(ConnectivityManager.TYPE_WIFI)

and parse the DetailedState enum of the returned NetworkInfo object

 

and don't forget to allow it the Manifest

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

 

Source: stackoverflow.com

Documentation: http://developer.android.com/reference/android/net/ConnectivityManager.html

February 5, 2010

[SOLVED] Starting XEN control daemon - proxy_arp: No such file or directory

Starting XEN control daemon: xend/etc/xen/scripts/network-route: line 27: /proc/sys/net/ipv4/conf/eth/proxy_arp: No such file or directory
/etc/xen/scripts/network-route: line 27: /proc/sys/net/ipv4/conf/eth/proxy_arp: No such file or directory
/etc/xen/scripts/network-route: line 27: /proc/sys/net/ipv4/conf/eth/proxy_arp: No such file or directory

Finally I had spare time to work on this problem. I learned that all I
had to do was to set the device to use explicitly in

/etc/xen/xend-config.sxp:
(network-script 'network-route netdev=eth0')

I guess in Xen <3.2 eth0 was the default setting.

Solved for me.


via Debian Bug report logs - #477525.