network provider not working in android
Asked Answered
Z

2

7

i have to make an android application in which i need to find the current location of the user. For this i am first using the GPS provider, but if it is not available i fall back to the network provider. Now there have been instances on my phone when even the network provider is not working and the statement network_enabled = lm .isProviderEnabled(LocationManager.NETWORK_PROVIDER);

is giving a false value.

My question

i am still able to make calls from my phone, so my network provider is working fine. what i need to know is in what conditions does the network provider not work? what could be the possible scenarios where the network provider on my android device not work to supply me my co-ordinates.

thank you in advance

Zeidman answered 31/5, 2011 at 5:9 Comment(3)
did u get any solution...i am having same probEzara
got same issue... Until know I suspect the fact that Telephony radio is not enough for network location, I guess that Internet should be available (through wifi or GSM)..Until now I ve no confirmed clue.Danyelledanyette
did anybody get any solution for this...i am also the having same problem..Adai
P
11

Two days puzzled over this problem. I found a solution. Just go to Settings -> Location & security and enable flag "Use wireless networks" in "My Location" group.

But now I have the question: what is default state of this flag? It will be very sad if the application would have to ask the user to enable this flag.

Poise answered 22/12, 2011 at 10:39 Comment(0)
K
0

You have to activate location via network providers in the Settings menu, and if at the start of the app it is disabled, you can show a Toast to notify the user

Kooky answered 17/7, 2015 at 17:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.