android.permission.ACCESS_NETWORK_STATE - why?

1,853 views
Skip to first unread message

Viktor Bresan

unread,
Aug 22, 2011, 7:14:02 AM8/22/11
to Google AdMob Ads Developers
Hi all,

I would like to know why is android.permission.ACCESS_NETWORK_STATE
mandatory?

My applications do not need that permission and I am not going to
introduce it just for the sake of ads. I am a long time AdMob user
(almost two years), running old SDK that requires only INTERNET
permission.

Thanks, Viktor.

Jim

unread,
Aug 23, 2011, 6:05:54 AM8/23/11
to Google AdMob Ads Developers
That permission is required to determine if network connectivity is
available. If you do not have that permission, then a request for an
ad without a server response is indeterminate (i.e. you do not know
if: it is lack of network connectivity, what network was active - if
any - that the phone used to attempt the request, if the server did
not respond to a valid request, if another network might be available
for use later, etc.).

I do not know which of these checks AdMob employs, but there are so
many factors that can result in no server response, this is very
helpful in preventing unnecessary work (e.g. don't even attempt to
request an ad when an internet connection is not available).

Here's a good post on the more general "how do I check for an internet
connection" question:
http://stackoverflow.com/questions/4238921/android-detect-whether-there-is-an-internet-connection-available

-Jim
Reply all
Reply to author
Forward
0 new messages