Skip navigation
Currently Being Moderated

air on android cannot connect to internet on mobile network

May 12, 2012 1:45 PM

Tags: #data #internet #android #mobile #connect #cannot #network #wifi

Hello fellow members,

I have an app that heavily uses internets and while it perfectly works when i have wifi enabled it fails to connect to my server when i'm using mobile data network.

 

Preconditions:

1. Other apps I have on my phone work just fine over mobile data networks.

2. I have <uses-permission android:name="android.permission.INTERNET"/> in my descriptor

3. After first call fails i run URLMonitor service it returns avalable = false < which means i don't have a connection of course (or so my air app thinks)

4. when running NetworkInfo.networkInfo i get the following (note there is no address or hardware address on mobile though its enabled!):

 

[trace] name: mobile

[trace] display name: mobile

[trace] mtu: -1

[trace] active?: true

[trace] parent interface: null

[trace] hardware address:

[trace] # addresses: 0

 

[trace] name: WIFI

[trace] display name: WIFI

[trace] mtu: -1

[trace] active?: false

[trace] parent interface: null

[trace] hardware address: 78:D6:F0:30:39:52

[trace] # addresses: 0

 

 

When i run the same check with wifi enabled i do get viable IP address.

 

I couldn't find anything related to this problem on google. This is my last resort, if anyone knows anything please help.

 

Thanks.

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points