-5

I want to get the location from Android, so I set a permission. But I got confused when I found another article saying:

android.permission.INTERNET is needed.

Why is it so? Does ACCESS_FINE_LOCATION include INTERNET?

Gediminas Masaitis
  • 3,172
  • 14
  • 35
  • 1
    Possible duplicate of [What permission do I need to access Internet from an android application?](http://stackoverflow.com/questions/2378607/what-permission-do-i-need-to-access-internet-from-an-android-application) – Chaoz Mar 06 '16 at 12:15

1 Answers1

3

INTERNET permission allows you to connect to the internet. Without it, all attempts will fail or throw an exception. FINE_LOCATION allows you to use GPS. It does not include INTERNET.

Gabe Sechan
  • 90,003
  • 9
  • 87
  • 127
  • Your app may need it for other reasons, but if you're using gps all you need is fine location. Note if you're using the fused location provide you may need internet to use AGPS – Gabe Sechan Mar 16 '16 at 06:45
  • from Android Developer API, I just find two ways of getting location.And Permission_Fine_location is sufficient for both,including GPS and Internet. –  Mar 16 '16 at 07:02
  • ...that's what I said. I also explained what INTERNET was, maybe that confused you? – Gabe Sechan Mar 16 '16 at 07:21
  • I want to explain when you use Permission_FINE_LOCATION,you don't need to add INTERNET_PERMISSION. However thank you very much,this is my first time to ask for help –  Mar 16 '16 at 07:27