How to use integers to display a status
<p>I found something interesting in the android OS, that I want to use in my own apps but how?</p>

<p>Like in the ConnectivityManager <a href="http://developer.android.com/reference/android/net/ConnectivityManager.html" rel="nofollow">http://developer.android.com/reference/android/net/ConnectivityManager.html</a>, you see status codes like</p>

<pre><code>public static int TYPE_WIFI = 1;
</code></pre>

<p>When you call the connectivity manager with this code:</p>

<pre><code>ConnectivityManager mConnectivityManager = (ConnectivityManager) getSystemService(Connectivity_Service);
NetworkInfo iswifi = mConnectivityManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
if (iswifi.isConnected()){ msg = "You got WIFI!"}
</code></pre>

<p>but if I'm having a class that needs to say if I'm having a internet connection, how can i let it return a status code like that?</p>

<p>Already thanks for your answers!:)</p>

<p>Wout</p>
