How do I check if my app is connected to the internet?
I found this post, but it seems you can only check if connection is available. Detect whether there is an Internet connection available on Android
That post did have the correct answer, I was just too far from my wifi and would always fail the test. The problem is solved.
I would like to be able to check something like this:
if(!isConnectedToInternet())
{
Toast.makeText(getApplicationContext(), "Please connect to the internet.",
Toast.LENGTH_LONG).show();
}