network provider not working in android

前端 未结 2 1580
别那么骄傲
别那么骄傲 2021-02-04 17:28

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 bac

相关标签:
2条回答
  • 2021-02-04 18:27

    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.

    0 讨论(0)
  • 2021-02-04 18:35

    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

    0 讨论(0)
提交回复
热议问题