aws / amazon-freertos-ble-android-sdk

Android SDK for FreeRTOS Bluetooth Devices.
Apache License 2.0
49 stars 41 forks source link

location services must be enabled #27

Closed GKNSTM closed 4 years ago

GKNSTM commented 4 years ago

Describe the bug I suggest to indicate clearly in the documentation that location services must be enabled on Android device. Or test it in the app and display a warning when it is not enabled. If the user didn't enable location services on its Android device, the device will not appear when clicking on "Scan for BLE devices" in the Android application. For the user it is not obvious that the device doesn't appear because location services are disabled.

Build info What is the branch and commit on the device side? 2201912.00 What is the branch and tag the SDK side? v1.1.0 Does pulling the latest code help resolve the issue? no

System info What is the Android version? 6.0 What is the bluetooth version? 4.2

To Reproduce What is the frequency of this issue? always Steps to reproduce the behavior: on the Android device: in the Settings, disable location services. enable bluetooth. start Amazon FreeRTOS application. click on "Scan for BLE devices".

Log Could you provide log on both the device side and SDK side?

Additional context none

ravibhagavandas commented 4 years ago

Hi, Thanks for bringing this into attention. As per the Android documentation on start_scan api, the only requirement is to provide ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permissions in the manifest file. Permission is by default provided in app's AndroidManifest.xml. Is this extra requirement of turning on location services, needed for all android phones ? Instead of checking this in code, how about mentioning this in README instructions ?

GKNSTM commented 4 years ago

Hi, Yes, mentioning this in README would be fine. Guillaume

ravibhagavandas commented 4 years ago

Changes are added in the commit https://github.com/aws/amazon-freertos-ble-android-sdk/commit/e5a23e57f222b8f9a0d7971fc31d63754581d2a0. Closing this issue. Please open an issue if you have any further questions.