sphero-inc / Sphero-Android-SDK

🚫 DEPRECATED REPO: Sphero™ is the amazing robotic ball ( gosphero.com ), this is the repository for the Android SDK for Sphero™. Visit dev site for more information:
https://developer.gosphero.com
160 stars 86 forks source link

Location permission required for connecting to Sphero on Android 6 #16

Closed hunyadym closed 8 years ago

hunyadym commented 9 years ago

On Android 6, you can only read the HW address of nearby Bluetooth devices if the app has ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permissions (https://developer.android.com/intl/es/about/versions/marshmallow/android-6.0-changes.html#behavior-hardware-id).

Therefore, the Sphero app can't connect to the Sphero balls on Android 6.0 (I found this problem using Nexus 5, 7 and 9s), and also the apps using this SDK can't connect without this permission. After adding this permission to my app, it could connect to the Sphero. (The app previously worked on Android 5.1 without any problem on the same devices.)

Whateverest commented 9 years ago

+1 ! Im having the same problem on my Nexus 5.

droid-girl commented 8 years ago

I have the same problem here, Nexus 5 and Nexus 7 with Android M

useyourblues commented 8 years ago

How do I add this permission to the Sphero app?

PaulTR commented 8 years ago

The official Sphero app has been updated. Updated samples are coming out soon. For your own programs you will just need to include the location permission in your manifest, and make sure you request it during runtime if you target API 23+.