2

I am working in BLE apps. I have some doubts in GPS permission to perform BLE scanning.

  1. Is BLE scan will work in tablets which do not have GPS chip?
  2. startLescan() will work without GPS permission?
thiru
  • 45
  • 1
  • 6

2 Answers2

2

BLE has absolutely nothing with GPS. Here's a detailed explanation: https://developer.android.com/guide/topics/connectivity/bluetooth-le

You may need to declare the following permissions:

<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>

<!-- If your app targets Android 9 or lower, you can declare
     ACCESS_COARSE_LOCATION instead. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

NOTE: while the GPS is not actually used, you have to declare ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION for things to work properly since the beacons are often used to provide location information.

lenik
  • 23,228
  • 4
  • 34
  • 43
  • @lenik- it means either location off or device does not have GPS chip it will not capture beacon packets right? – thiru Nov 21 '19 at 06:58
  • @Thiru there are many sources for the location information besides GPS, like WiFi, cellular towers, BLE beacons. The permissions to access the location have nothing to do with having GPS chip or not. – lenik Nov 21 '19 at 07:18
0

Yes.

You only need to turn on Bluetooth of tablet. BLE is totally dependent on Bluetooth, you only need to check, is tablet Bluetooth supporting BLE or not.

  • 1
    thanks. But as per android documentation GPS location require for capture beacons. So, in this case, can able to capture the beacons? – thiru Nov 21 '19 at 06:37
  • You only need permissions for ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION but its not mean that you need gps for access beacons, Android also can use WiFi access points and cell towers to infer location. – Deepak Tiwari Nov 21 '19 at 07:49