locationAlways disable
parent
40efff3fb7
commit
7638d5391c
|
|
@ -13,13 +13,11 @@
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.CAMERA" />
|
<uses-permission android:name="android.permission.CAMERA" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" />
|
<!-- <uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED" />-->
|
||||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_BLUETOOTH_ADMIN" />
|
<!-- <uses-permission android:name="android.permission.ACCESS_BLUETOOTH_ADMIN" />-->
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<!-- <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />-->
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
|
|
||||||
|
|
||||||
|
|
||||||
<application
|
<application
|
||||||
|
|
|
||||||
|
|
@ -165,20 +165,20 @@ class _SettingPrinterViewState extends State<SettingPrinterView> {
|
||||||
void _permission() async {
|
void _permission() async {
|
||||||
if( Platform.isAndroid) {
|
if( Platform.isAndroid) {
|
||||||
var statusLocation = await Permission.location.status;
|
var statusLocation = await Permission.location.status;
|
||||||
var statusLocationAlways = await Permission.locationAlways.status;
|
//var statusLocationAlways = await Permission.locationAlways.status;
|
||||||
log.i(statusLocation);
|
log.i(statusLocation);
|
||||||
log.i(statusLocationAlways);
|
//log.i(statusLocationAlways);
|
||||||
if (
|
if (
|
||||||
statusLocation.isUndetermined
|
statusLocation.isUndetermined
|
||||||
|| statusLocation.isDenied
|
|| statusLocation.isDenied
|
||||||
|| statusLocation.isPermanentlyDenied
|
|| statusLocation.isPermanentlyDenied
|
||||||
|| statusLocationAlways.isUndetermined
|
// || statusLocationAlways.isUndetermined
|
||||||
|| statusLocationAlways.isDenied
|
// || statusLocationAlways.isDenied
|
||||||
|| statusLocationAlways.isPermanentlyDenied
|
// || statusLocationAlways.isPermanentlyDenied
|
||||||
) {
|
) {
|
||||||
DialogResponse response = await _dialogService.showConfirmationDialog(
|
DialogResponse response = await _dialogService.showConfirmationDialog(
|
||||||
title: 'Доступ',
|
title: 'Доступ',
|
||||||
description: 'Для поиска устройств Bluetooth необходимо предоставить доступ к собиру данных о местоположении, даже когда приложение закрыто или не используется.',
|
description: 'Для поиска устройств Bluetooth необходимо предоставить доступ к собиру данных о местоположении.',
|
||||||
cancelTitle: 'Нет',
|
cancelTitle: 'Нет',
|
||||||
confirmationTitle: 'Хорошо',
|
confirmationTitle: 'Хорошо',
|
||||||
);
|
);
|
||||||
|
|
@ -188,18 +188,18 @@ class _SettingPrinterViewState extends State<SettingPrinterView> {
|
||||||
.request();
|
.request();
|
||||||
|
|
||||||
if (location.isGranted ) {
|
if (location.isGranted ) {
|
||||||
PermissionStatus locationAlways = await Permission.locationAlways
|
// PermissionStatus locationAlways = await Permission.locationAlways
|
||||||
.request();
|
// .request();
|
||||||
if(locationAlways.isGranted) {
|
// if(locationAlways.isGranted) {
|
||||||
print('Granted');
|
// print('Granted');
|
||||||
} else {
|
// } else {
|
||||||
_dialogService.showDialog(
|
// _dialogService.showDialog(
|
||||||
description: 'Необходимо предоставить постоянный доступ к местоположении для поиска принтера, даже когда приложение закрыто или не используется.');
|
// description: 'Необходимо предоставить постоянный доступ к местоположении для поиска принтера, даже когда приложение закрыто или не используется.');
|
||||||
_navigatorService.pop();
|
// _navigatorService.pop();
|
||||||
}
|
// }
|
||||||
} else {
|
} else {
|
||||||
_dialogService.showDialog(
|
_dialogService.showDialog(
|
||||||
description: 'Необходимо предоставить доступ к местоположении для поиска принтера, даже когда приложение закрыто или не используется.');
|
description: 'Необходимо предоставить доступ к местоположении для поиска принтера');
|
||||||
_navigatorService.pop();
|
_navigatorService.pop();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ packages:
|
||||||
name: async
|
name: async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.6.1"
|
version: "2.8.1"
|
||||||
auto_size_text:
|
auto_size_text:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -56,7 +56,7 @@ packages:
|
||||||
name: charcode
|
name: charcode
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.1"
|
||||||
charset_converter:
|
charset_converter:
|
||||||
dependency: "direct main"
|
dependency: "direct main"
|
||||||
description:
|
description:
|
||||||
|
|
@ -344,7 +344,7 @@ packages:
|
||||||
name: meta
|
name: meta
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.3.0"
|
version: "1.7.0"
|
||||||
nested:
|
nested:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -622,7 +622,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.3.0"
|
version: "0.4.2"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
name: aman_kassa_flutter
|
name: aman_kassa_flutter
|
||||||
description: A new Flutter project.
|
description: A new Flutter project.
|
||||||
version: 1.2.3+32
|
version: 1.2.3+33
|
||||||
environment:
|
environment:
|
||||||
sdk: '>=2.3.0 <3.0.0'
|
sdk: '>=2.3.0 <3.0.0'
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue