Jump to content
Sign in to follow this  
Rollo62

[Android, 32/64] BluetoothLE requires location enabled

Recommended Posts

Hi there,

 

I took some time to check with 32/64-Bit on older devices, and found that Bluetooth was not running on my old Nexus 7.

The Nexus 7 (on Android 6.0.1) is a real 32-Bit device, so I searched into the wrong direction.

The real reason was that Location was not enabled (while location permission was granted, as it should).

I didn't find much useful answer, only this note.

 

The rule seems to be:

  • you have to set at least coarse location permission
  • on Android 6.0.1 (32-Bit) you have to enable location sensor additionally

 

How about behaviour in other versions < or > Android 6.0.1 ?

 

This is a little disturbing fact to me, since I always considered that Bluetooth need the coarse Location permission
only because of  BLE is able to retrieve its own location info in its own network, like Beacon technology  (my personal assumption).

Now it seems that really physically location sensor must be running in the Phone/Tablet too (why).

 

Usually I have this active anyway in my test devices, so I never been falling into such trap before, so I learned something new today.

I wonder if this is caused by the old Android 6.0.1 only, which had many BLE issues, or if this is a general requirement in any OS version ?

Maybe there is some deeper documentation what explains this odd behaviour.

 

 

Edited by Rollo62

Share this post


Link to post

Yes, permission is required, that is clear.
But it seems that additionally location in the phone (GPS sensor) must be also enabled to use Bluetooth, thats my point.

 

I just checked with more modern Phones.

Yes, Location needs permission AND location needs to be enabled in the Galaxy S9+ phone (Android 9).

 

Thats strange, because I remember that it was not always needed to enable location, to use Bluetooth, anyway I'm not 100% sure about that.

So I have to check with different phones how things behave.

Edited by Rollo62

Share this post


Link to post
3 hours ago, Rollo62 said:

Thats strange, because I remember that it was not always needed to enable location, to use Bluetooth, anyway I'm not 100% sure about that.

It has always needed location permissions, they just don't need to have been requested at runtime prior to Android 6.

Share this post


Link to post
10 hours ago, Dave Nottage said:

It has always needed location permissions, they just don't need to have been requested at runtime prior to Android 6.

Yes, but location "permisson" is different to location "permission + location really enabled".

When the user starts with location permission, and then switch off after location, BLE will stop.

 

There are several ways to retrieve location: via GPS sensor, via WiFi triangulation, via Bluetooth Beacon, etc.

So why should Bluetooth require GPS sensor ?

 

I must check my permission system, maybe I requested coarse AND fine location, I will check if thast makes the difference.
Probably I mixed up some configurations from different projects.

 

Share this post


Link to post
35 minutes ago, Rollo62 said:

So why should Bluetooth require GPS sensor ?

Apparently this is the reason:

 

https://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id

 

I nearly fell off my chair when I read that: essentially give up your location privacy so no-one can steal your Bluetooth Mac address? Perhaps someone else can explain why that's a good thing.

Share this post


Link to post

Thanks Dave, that looks like the "explanation".

Very good to know this note from Android.

Makes not much sense to me either, so we have to believe that this is an important step in security.

 

Unfortunately I cannot explain such info to my customers, so I stick to my own version:  that BLE might span up its own "location" network via Beacons.

At least my customers could follow and understand such explanation as reason for location permission.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×