Re: [android-developers] Check For Internet Connection

2013-07-16 Thread Nathan
On Tuesday, July 16, 2013 10:37:16 AM UTC-7, Robert Greenwalt wrote: > > You certainly can have a race condition, but the more likely thing is > either the network never had internet reach (walled garden) or temporarily > doesn't have access to the internet. Both the cell radio and wifi have a

Re: [android-developers] Check For Internet Connection

2013-07-16 Thread Nathan
On Tuesday, July 16, 2013 10:12:08 AM UTC-7, Kostya Vasilyev wrote: > > You didn't say how exactly this fails in your app, but... > Sorry. I meant my app says they don't have a connection but the user thinks they do. > - I've seen failures with my app not being able to connect to > (exte

Re: [android-developers] Check For Internet Connection

2013-07-16 Thread Robert Greenwalt
You certainly can have a race condition, but the more likely thing is either the network never had internet reach (walled garden) or temporarily doesn't have access to the internet. Both the cell radio and wifi have a tendency to hold on trying to get reconnected before they give up and report a d

Re: [android-developers] Check For Internet Connection

2013-07-16 Thread Kostya Vasilyev
You didn't say how exactly this fails in your app, but... - I've seen failures with my app not being able to connect to (external) servers at all, reported by a few users, even when their devices had apparently working Internet access. The "magic reinstall" fixed it for them. - I've also seen som

[android-developers] Check For Internet Connection

2013-07-16 Thread Nathan
The following is what I have seen as a fairly standard method for checking for an internet connection. @Override public void checkforConnection(Context ctx) { // TODO Auto-generated method stub ConnectivityManager mgr = (ConnectivityManager) ctx.getSystemService(Context.C

Re: [android-developers] Check for internet connection inside an anonymous class

2009-12-30 Thread Mark Murphy
Hekki wrote: > Since i'm in an anonymous class and I've read that it's not a good > idea to pass the whole context to classes Where did you read that? I sure hope that I did not write that... Moreover, if you are truly in an anonymous inner class of something, if that "something" is an Activity o

[android-developers] Check for internet connection inside an anonymous class

2009-12-30 Thread Hekki
Hi, I was trying to make an anonymous class to upload a file to a server. I wanted to make that easily reusable much like some kind of component. Everything works fine but as a final touch i wanted to add a function to check if internet connection is available. Problem is, the call to the conne

[android-developers] Check for internet connection

2009-08-20 Thread cafffiene
What is the simplest way to check whether my app can access the internet? I am using some APIs that use the internet, but they crash if there is no connectivity. So I just want to check if there is internet access by any means. thanks --~--~-~--~~~---~--~~ You re