mirror of
https://github.com/oliexdev/openScale.git
synced 2025-08-18 22:41:44 +02:00
check for location service after coarse location permission is granted
This commit is contained in:
@@ -327,7 +327,9 @@ public class BluetoothPreferences extends PreferenceFragment {
|
||||
switch (requestCode) {
|
||||
case PermissionHelper.PERMISSIONS_REQUEST_ACCESS_COARSE_LOCATION: {
|
||||
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
|
||||
startBluetoothDiscovery();
|
||||
if (PermissionHelper.requestLocationServicePermission(getActivity())) {
|
||||
startBluetoothDiscovery();
|
||||
}
|
||||
} else {
|
||||
Toast.makeText(getActivity(), R.string.permission_not_granted, Toast.LENGTH_SHORT).show();
|
||||
btScanner.getDialog().dismiss();
|
||||
|
@@ -193,7 +193,7 @@
|
||||
|
||||
<string name="permission_not_granted">Permission not granted</string>
|
||||
<string name="permission_bluetooth_info">Coarse location permission needed to search for Bluetooth devices. It can be revoked after the device is found.</string>
|
||||
<string name="permission_location_service_info">Location service (GPS) needed to search for Bluetooth devices. Please enable it under the Android settings. It can be revoked after the device is found.</string>
|
||||
<string name="permission_location_service_info">Location service needed to search for Bluetooth devices. Please enable it under the Android settings. It can be revoked after the device is found.</string>
|
||||
<string name="permission_bluetooth_info_title">Info</string>
|
||||
<string name="permission_read_write_data_description">read/write openScale data, including user information and all saved measurements</string>
|
||||
<string name="permission_read_write_data_label">Read/Write openScale Data</string>
|
||||
|
Reference in New Issue
Block a user